https://github.com/grooooaaaark/rpn-calculator-api
Clean Code implementation of a RPN calculator API using MongoDB to store operations and results
https://github.com/grooooaaaark/rpn-calculator-api
api calculator clean-architecture clean-code fastapi python
Last synced: about 2 months ago
JSON representation
Clean Code implementation of a RPN calculator API using MongoDB to store operations and results
- Host: GitHub
- URL: https://github.com/grooooaaaark/rpn-calculator-api
- Owner: GROOOOAAAARK
- Created: 2023-12-05T00:35:45.000Z (over 2 years ago)
- Default Branch: trunk
- Last Pushed: 2025-02-15T10:48:27.000Z (over 1 year ago)
- Last Synced: 2025-05-17T11:36:42.964Z (about 1 year ago)
- Topics: api, calculator, clean-architecture, clean-code, fastapi, python
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python FastAPI Calculator
This is a simple Python FastAPI RPN Calculator implementation.
## Install and run the project
```bash
make install-project
source .envrc
make run
```
Or
```bash
pipenv install
source .envrc
python -m app
```
## Run tests
### E2E tests
Use the postman collection in `tests/e2e` to run the tests.
You just have to set the environment variable `api_url` to `localhost:8000`.
## Docker
Run the project with docker:
```bash
docker build --no-cache -f docker/app.Dockerfile -t rpn-api .
docker network create --attachable rpn-network
docker compose -f docker/docker-compose.yml up
```
## Upgrades
- [ ] Handle multiple expressions in the same query
- [ ] Add more supported operations in expression evaluation
- [ ] Better read function in mongodb implementation
- [ ] Add more tests (adapters, use cases, e2e w k6)
- [ ] Add tests on responses inside Postman collection