This is a simple API built using FastAPI to manage student records.
- Get Student by ID: Retrieve a student record by their ID.
- Get All Students: Retrieve all student records.
- Get Student by Name: Retrieve a student record by their name.
- Create Student: Create a new student record.
- Update Student: Update an existing student record.
- Delete Student: Delete an existing student record.
The API is documented using FastAPI's automatic OpenAPI and Swagger UI generation. You can view the documentation by running the server and visiting the /docs
or /redoc
endpoints in your browser.
- Python 3.x installed on your system.
-
Clone this repository to your local machine:
git clone <repository-url>
-
Navigate to the project directory:
cd fastapi-student-records
-
Install the dependencies:
pip install -r requirements.txt
uvicorn main:app --reload
Once the server is running, you can access the API and its documentation:
API: http://localhost:8000 Documentation (Swagger UI): http://localhost:8000/docs Documentation (ReDoc): http://localhost:8000/redoc