This is a sample API built with FastAPI and Authentication and Authorization using JWT.
- DevContainers (VSCode)
- Python 3.12
- Docker
-
Clone the repository
git clone https://github.com/Lucho00Cuba/sample-api.git cd sample-api
2.a. Using DevContainers (Recommended)
- VSCode should prompt you to open the project in a DevContainer. The necessary environment will be set up automatically.
2.b. Without DevContainers
-
Create a virtual environment:
python3 -m venv venv -
Activate the virtual environment:
On Linux/MacOS:
source venv/bin/activateOn Windows:
.\venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Run the API:
API_IS_DEV=true src/entrypoint.sh
- 🔐 Authorization and Authentication using JWT
- 🔄 Automatic loading routes from the
src/routesfolder- 📝 Manually set an endpoint if needed
- 📊 Custom response formatting for consistent API responses
- 📑 Swagger and Redoc auto-generated API documentation
- 📦 Docker support
- ✅ Improve unit and integration test coverage
- 🔗 Integrate with a third-party user system such as Rancher-Manager (Local)
- 🚀 Implement rate-limiting to prevent abuse
- 🔄 Implement a refresh token mechanism for better security
- 📂 Improve database handling, possibly integrating SQLAlchemy or another ORM