https://github.com/zayminmaw/detrack-api-clone
Simplified Detrack API clone with FastAPI and Postgres database.
https://github.com/zayminmaw/detrack-api-clone
delivery-api python
Last synced: 10 months ago
JSON representation
Simplified Detrack API clone with FastAPI and Postgres database.
- Host: GitHub
- URL: https://github.com/zayminmaw/detrack-api-clone
- Owner: zayminmaw
- Created: 2021-12-24T04:47:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-01T16:51:25.000Z (over 4 years ago)
- Last Synced: 2025-02-01T21:16:19.474Z (over 1 year ago)
- Topics: delivery-api, python
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Development setup
First create a directory then create a virtual environment in it (PLEASE USE VIRTUAL ENVIRONMENT).
```shell
python3 -m venv
```
To activate your virtual environment go to
#### On Window :
```shell
\Scripts\activate.bat
```
#### On Unix or MacOs :
```shell
source /bin/activate
```
Finally git clone the repository.
```shell
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.
```shell
pip install -r requirements.txt
```
Migrate your models into database.
```shell
# to create or update the models to database
alembic upgrade head
```
Now let's start your server.
```shell
uvicorn main:app --reload
```
#### Useful commands
if you installed new packages during development, don't forget to update the requirement.
```shell
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.
```shell
alembic revision --autogenerate -m "init"
```