Dead simple template manager for FastAPI applications
Project description
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 noticing SUCCESS your project is ready, enter project with 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)
why such a structure of the project
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
Built Distribution
Hashes for fastapi_plan-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a5d680586d665e0589df9b1f9475300bfe8a16995bfe4006a96259c0b88ad58 |
|
MD5 | 1c082b2263f04964086bd24c373f6b79 |
|
BLAKE2b-256 | 8628094a7c5e086524807ee8871ee001fe8eb6130bb83d8f8d8d652a8edf1a69 |