Skip to content

Repository files navigation

Pre-requisites

Before getting started, please ensure that you have the following dependencies installed on your system:

Getting Started

To set up and run the app, please follow these steps:

  1. Move to the directory where pyproject.toml is located:

    cd python-project
  2. Install the dependencies:

    poetry install

    If you don't want to install the dev packages, you can use the following command instead:

    poetry install --without dev
  3. Activate the virtual environment:

    poetry shell
  4. All necessary commands to start with the project can be found in Makefile. To see all available commands, run the following command:

    make help
  5. Build and start the Docker containers:

    make build
  6. Open your browser and go to http://localhost:8000 to see the app running.

  7. Since there is only one SQLAlchemy model, you can create a new migration file by running the following command:

    make autogenerate msg="user_init"

    This will create a new migration file in python-project/alembic/versions/.

    Since the app service inside docker-compose.yaml will automatically run the alembic upgrade head command whenever it starts, in order to apply the new migration, you just need to stop the containers and start them again. CTRL+C to stop the containers and then run the following command to start them again:

    make up
  8. To check the documentation of the API, go to http://localhost:8000/docs.

  9. To check the database you can use hosted pgAdmin tool, just go to http://localhost:5050 and login with the credentials from .env file:

    • Email: $PGADMIN_EMAIL
    • Password: $PGADMIN_PASSWORD

ENJOY AND GOOD LUCK WITH YOUR PROJECT! 🧬 🚀

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages