A repository that contains the Streamfinity's prototype REST API that go with How to Tackle Scalability With CQRS using Python and FastAPI
Here are the steps to install and run the prototype.
- Docker
- Python 3.11
- Pip3
-
Install the Python requirements:
pip3 install -r requirements.txt
-
Start the database:
docker compose up
-
In another terminal, navigate to the
app
folder and start the application by:cd app uvicorn main:app
During the startup of the application a selection of movies and their actors will be entered in the database.
If you need to reset the database, follow these steps:
-
Stop docker compose:
docker compose down
-
Run the cleanup script:
python3 clear_db_folders.py
-
Restart the database:
docker compose up
-
Navigate to the
app
folder and start the application:cd app uvicorn main:app
This project is licensed under the MIT License - see the LICENSE file for details.
- This project is part of the journey of Streamfinity to improve its server operations by segregating read and write operations.
If you're having any problem, please raise an issue on GitHub.