A small package to bootstrap a fast api application
Project description
create-fast-app
create-fast-app
is a Python package that helps you quickly create new FastAPI projects with basic templates. It includes a command-line interface (CLI) that lets you specify the type of project you want to create, as well as options to attach a machine learning directory.
Installation
To use create-fastapi-app, you must have Python 3.7 or later installed on your system. You can install the package using pip:
pip install create-fast-app
Usage
To create a new FastAPI project, run the following command:
create-fast-app <project-name> --type=<project-type>
Replace <project-name>
with the desired name for your new project. The --type
option is used to specify the type of project you want to create. There are three options available:
microservice
: Creates a FastAPI microservice project.monolith
: Creates a FastAPI monolith project.ml_app
: Creates a FastAPI machine learning project.
By default, the --type option is set to microservice.
You can also include the --ml option to attach a machine learning directory to your project. This option is only available for microservice and monolith project types.
For example, to create a FastAPI monolith project with a machine learning directory attached, run:
create-fast-app my-project --type=monolith --ml=True
After running the command, create-fast-app
will create a new directory with your project name in the current working directory. It will then copy the appropriate FastAPI project template and install the required dependencies in a new virtual environment.
Project Structure
The directory structure for each project type is as follows:
Microservice
microservice-project-1/
├── requirements/
│ ├── base.txt
│ ├── dev.txt
│ └── prod.txt
├── src/
│ ├── internal/
│ │ └── ...
│ ├── __init__.py
│ ├── app.py
│ ├── database.py
│ ├── models.py
│ ├── schemas.py
│ └── utils.py
├── tests
├── Dockerfile
├── README.md
├── Makefile
├── .env
├── .gitignore
└── venv
Monolith
monolith-project-1/
├── requirements/
│ ├── base.txt
│ ├── dev.txt
│ └── prod.txt
├── src/
│ ├── package_one/
│ │ ├── config.py
│ │ ├── constants.py
│ │ ├── dependencies.py
│ │ ├── exceptions.py
│ │ ├── router.py
│ │ ├── schema.py
│ │ ├── service.py
│ │ └── utils.py
│ ├── internal/
│ │ └── ...
│ ├── __init__.py
│ ├── main.py
│ ├── config.py
│ ├── database.py
│ ├── models.py
│ └── utils.py
├── tests
├── Dockerfile
├── README.md
├── Makefile
├── .env
├── .gitignore
└── venv
Machine learning
ml-project-1/
├── data/
│ ├── raw
│ └── processed/
│ ├── train
│ └── test
├── models
├── notebooks
├── src/
│ ├── data/
│ │ └── make_dataset.py
│ ├── feature/
│ │ └── build_features.py
│ ├── models/
│ │ ├── predict.py
│ │ └── train.py
│ └── utils.py
├── Dockerfile
├── README.md
├── Makefile
├── .env
└── .gitignore
If attached to a monolith or a microservice project, this directory is mounted into the internal directory of the project.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file create-fast-app-0.0.2.tar.gz
.
File metadata
- Download URL: create-fast-app-0.0.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca9e16c5187fcc24562230f408fcb9c76ce82b4be358960f19b05aea4a9579fc |
|
MD5 | 73414b94dd4ec7d53bef7924551b0a76 |
|
BLAKE2b-256 | aae1026056ad5322a441639ce47ae831b4691b7819be21d9a47c475f49315694 |
File details
Details for the file create_fast_app-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: create_fast_app-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35b6eb91321c34ccb7a8d484f585033a94bea2d8a37e044035129dd98e28891d |
|
MD5 | 0f850629ff3fbfb4177f8bb0a4fb0445 |
|
BLAKE2b-256 | e6a4d61b9ab95c9826a5b8870cea6f0e98d8e395dae5b43cb140057e446c6ed4 |