Provide an API-based RPN calculator with a database model of calcul histories and the possibility to export histories into CSV.
- ⚡ FastAPI for the Python backend API.
- 🧰 SQLModel for the Python SQL database interactions (ORM).
- 🔍 Pydantic, used by FastAPI, for the data validation and settings management.
- 💾 PostgreSQL as the SQL database.
- 🐋 Docker Compose for development and production.
- ✅ Tests with Pytest.
- 🚢 Deployment instructions using Docker Compose
- 🏭 CI/CD based on GitHub Actions.
To use this project, you need to clone it and launch it.
Follow the next steps:
- Clone this repository:
git clone git@github.com:thyb-zytek/npi-api.git
- Enter into the new directory:
cd npi-api
- Launch your stack:
docker compose up -d
- Verify API server is up, if it displays
OK
, it means that the server is up:
curl -X 'GET' 'http://localhost:8000/healthcheck' -H 'accept: application/json'
Now you can use the RPN APIs.
🌐 Interactive Docs (Swagger UI): http://localhost:8000/docs
🌐 Alternative Docs (ReDoc): http://localhost:8000/redoc
🌐 APIs: http://localhost:8000/api/v1/rpn
📖 RPN documentation: rpn.md
The RPN API project is licensed under the terms of the MIT license.