Dead simple template manager for FastAPI applications
Project description
About
dead simple but powerful template manager for FastAPI applications.
Quickstart
NOTE: you will need docker and optional but recommended poetry installed!
install via pip (or poetry):
pip install fastapi-plan
initialize new FastAPI project:
fastapi-plan
enter project_name and other information and after project is ready, cd project_name
and continue installing dependencies:
poetry install
# optional if you selected "requirements.txt" (with venv installed)
pip install -r requirements.txt
since we wanna use uvicorn in development, create only postgres container using docker-compose:
docker-compose up -d db
now run aerich migrations and configure tortoise (and add first superuser)
aerich upgrade
python app/initial_data.py
finally you can run this command to start uvicorn server
uvicorn app.main:app --reload
Short project structure
|── app
| ├── api # endpoints/dependecies
| |
| ├── core # settings and security algorithms
| |
| ├── crud # CRUD operations
| |
| ├── migrations # for aerich migrations
| |
| ├── models # tortoise models
| |
| ├── schemas # pandatic schemas
| |
| ├── tests # tests
| |
| ├── initial.sh # initial shell script used by docker
| ├── initial_data.py # init database and add first superuser
| ├── main.py # main fastapi application file
|
├── config # nginx server config file
|
├── .env # .env file with settings
|
├── Dockerfile # dockerfile for web app
|
├── aerich.ini # aerich (migrations) configuration
|
├── docker-compose.yml # puts it all together
|
├── pytest.ini # Pytest configurations
|
├── pyproject.toml # python dependencies (poetry)
|
├── poetry.lock # python dependencies (poetry)
|
├── (optional) requirements.txt # python dependencies (pip)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastapi-plan-0.2.3.tar.gz
(34.6 kB
view hashes)
Built Distribution
Close
Hashes for fastapi_plan-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14f2a18c112fcd9ea82fd1b19b71919a1a54585ffd490e99f12b64ae53adec04 |
|
MD5 | 8885c3cdccb14f36df2396916932ec69 |
|
BLAKE2b-256 | cff77705f5c68bddc9c542f1d97404f15bc73ebd0d4e3068617071c18a37251a |