Skip to main content

Dead simple template manager for FastAPI applications

Project description

GitHub license PyPI PyPI - Python Version tests

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)

Uploaded Source

Built Distribution

fastapi_plan-0.2.3-py3-none-any.whl (47.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page