Recommend to create a virtual python environment
python install -r requirement.txt
Copy .env.example
cp .env.example .env
and update
DB_USERNAME=sa
DB_PASSWORD=pw
DB_SERVER=localhost
DB_NAME=test
DB_TABLE_PREFIX=test
Warning: In case got error cannot get env please restart terminal
python seed.py
To launch uvicorn:
uvicorn manpower_api.main:app --reload --port=8000
http://localhost:8000
Then load the fancy interactive docs page at
http://localhost:8000/docs
cd https://github.com/mengtongun/manpower_app.git
cd manpower_app
flutter pub get
fluter build web
cd ..
rm -rf web && cp manpower_app/build/web web
uvicorn manpower_api.main:app --port=8000
manpower_api
├── manpower_api
│ ├── auth
│ │ ├── router.py
│ │ ├── schemas.py # pydantic models
│ │ ├── models.py # db models
│ │ ├── config.py # local configs
│ │ ├── constants.py
│ │ ├── exceptions.py
│ │ ├── security.py
│ │ ├── service.py
│ └── employee
│ │ ├── router.py
│ │ ├── schemas.py
│ │ ├── models.py
│ │ ├── constants.py
│ │ ├── exceptions.py
│ │ ├── service.py
│ ├── config.py # global configs
│ ├── models.py # global models
│ ├── exceptions.py # global exceptions
│ ├── database.py # db connection related stuff
│ └── main.py
├── web # static build file from flutter web
│ └── index.html
│ └── ...
├── requirements.txt
├── README.md
├── .env
├── .gitignore
Details at
https://fastapi.tiangolo.com/tutorial/
and