Skip to content

A repository that contains all the examples that go with a Medium article called Understanding CQRS: A Pythonic Approach to Command-Query Separation

License

Notifications You must be signed in to change notification settings

PatrickKalkman/python-streamfinity-cqrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamfinity's Prototype

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.

Requirements

  • Docker
  • Python 3.11
  • Pip3

Installation Steps

  1. Install the Python requirements:

    pip3 install -r requirements.txt
  2. Start the database:

    docker compose up
  3. 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.

Restart with clean database

If you need to reset the database, follow these steps:

  1. Stop docker compose:

    docker compose down
  2. Run the cleanup script:

    python3 clear_db_folders.py
  3. Restart the database:

    docker compose up
  4. Navigate to the app folder and start the application:

    cd app
    uvicorn main:app

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • This project is part of the journey of Streamfinity to improve its server operations by segregating read and write operations.

Support

If you're having any problem, please raise an issue on GitHub.

About

A repository that contains all the examples that go with a Medium article called Understanding CQRS: A Pythonic Approach to Command-Query Separation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published