Calculate how much power each of a multitude of different powerplants need to produce (a.k.a. the production-plan) when the load is given and taking into account the cost of the underlying energy sources (gas, kerosine) and the Pmin and Pmax of each powerplant.
- Do not to rely on an existing (linear-programming) solver.
- The focus is on the programming concepts and structures and will be used as a base to discuss all kinds of interesting software engineering topics. You can read the full coding-challenge assignment for more details.
Github star history of FastAPI and some of its siblings: Flask, Django and Django Rest Framework
.
├── app
│ ├── __init__.py
│ ├── main.py
│ ├── models
│ │ ├── meritorder.py
│ │ └── powerplants.py
│ ├── schemas
│ │ ├── fuels.py
│ │ └── powerplant.py
│ ├── tests
│ │ ├── conftest.py
│ │ └── test_main.py
│ └── utils.py
├── docker-compose.yml
├── Dockerfile
├── example_payloads
│ ├── payload1.json
│ ├── payload2.json
│ └── payload3.json
├── README.md
├── requirements.txt
sudo docker compose up -d --build
# or for the older docker versions:
sudo docker-compose up -d --build
Open http://localhost:8899/docs or http://127.0.0.1:8899/docs in your browser.
sudo sudo docker compose dwon -v
# or for the older docker versions:
sudo sudo docker-compose dwon -v
Fast API generates an automatic generated API documentation.
The automatic generated API documentations are also interactive and you can test out the API just in the browser.
This project took a study day and an execution day and was build in the pre copilot and chatGPT era.
This project was done as part of job interview. It was the first time that I used FastApi and the first time I started out a project with Test Driven Development approach. I had lots of fun exploring these new concepts.