Skip to content

Simplified Detrack API clone with FastAPI and Postgres database.

Notifications You must be signed in to change notification settings

zayminmaw/detrack-api-clone

Repository files navigation

Development setup

First create a directory then create a virtual environment in it (PLEASE USE VIRTUAL ENVIRONMENT).

python3 -m venv <your-env-name>

To activate your virtual environment go to

On Window :

<your-env-name>\Scripts\activate.bat

On Unix or MacOs :

source <your-env-name>/bin/activate

Finally git clone the repository.

git clone https://github.com/zay467/detrack-api-clone.git

Then go into the cloned folder and install requirements (we will be continue working on this directory). While installing setup the ".env" file.

pip install -r requirements.txt

Migrate your models into database.

# to create or update the models to database
alembic upgrade head

Now let's start your server.

uvicorn main:app --reload

Useful commands

if you installed new packages during development, don't forget to update the requirement.

pip freeze > requirements.txt

This command is for auto generating the migration files if you add new models or make changes to your existing model. Then don't forget to mirgrate the changes.

alembic revision --autogenerate -m "init"

About

Simplified Detrack API clone with FastAPI and Postgres database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages