Skip to content

thyb-zytek/npi-api

Repository files navigation

Reverse Polish Notation API.

Tests Coverage

Provide an API-based RPN calculator with a database model of calcul histories and the possibility to export histories into CSV.

Technology Stack and Features

  • 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.

How To Use It

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.

Available URLs

🌐 Interactive Docs (Swagger UI): http://localhost:8000/docs

🌐 Alternative Docs (ReDoc): http://localhost:8000/redoc

🌐 APIs: http://localhost:8000/api/v1/rpn

RPN available operators and variables

📖 RPN documentation: rpn.md

License

The RPN API project is licensed under the terms of the MIT license.

About

Provide an API-based RPN calculator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published