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
<your-env-name>\Scripts\activate.bat
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
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"