This repository contains a demo project created while learning API development with Python. The project includes basic setup, routes, and functionality to demonstrate the fundamentals of building an API.
This demo project was developed as part of a learning exercise to understand API development using Python. The project uses FastAPI to create and manage API endpoints. FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
- Basic API setup using FastAPI
- CRUD (Create, Read, Update, Delete) operations
- Error handling
- Data validation with Pydantic models
- Interactive API documentation with Swagger UI and ReDoc
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/bipuldevashish/api_dev_demo cd api_dev_demo
-
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
To run the API server, use the following command:
uvicorn main:app --reload