Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 958 Bytes

README.md

File metadata and controls

54 lines (34 loc) · 958 Bytes

FASTAPI APP

FastAPI STARTUP

Setup APPLICATION

  1. Create a virtual environment.
   python -m venv env
  1. Activate virtual environment.
    source /path/to/venv/bin/activate`
  1. Install project dependencies pip install -r requirements.txt

  2. Start server.

python management.py runserver 

you could also specify the host and port to run

python management.py runserver ${host} ${port}

DATABASE SETUP

Starting the database run

python management.py makemigrations

run on cloning the repository and after making changes to the models also create a revision folder if it does not exist in the alembic directory


**review table data**

```bash
python management.py Hello

Adding new tables and columns to models

After creating new tables, or adding new models make sure to import the models in the alembic/env file then run python management.py makemigrations