Skip to main content

Create-fastapi-cli

A powerful CLI tool for quickly creating FastAPI projects, support >=Python 3.10.

Table of Contents

Features

  • Quick project setup with best practices
  • Support for both pip and poetry dependency management
  • Customizable project templates
  • Built-in testing and linting tools

Installation

pip install create-fastapi-cli

Quick Start

Create a new FastAPI project in seconds:

# poetry recommended
create-fastapi-cli --name myapp --install --poetry
# pip
create-fastapi-cli --name myapp --install
Option Description
--name The name of the project.
--install Install dependencies.
--poetry Use poetry to manage project, if not specified, will use pip to manage project.
--version The version of the cli.

Usage

Run

Start the FastAPI server:

cd myapp

# pip
uvicorn src.main:app --host 0.0.0.0 --port 8000 --log-level=info --reload

# poetry
poetry run uvicorn src.main:app --host 0.0.0.0 --port 8000 --log-level=info --reload

Lint

ruff check --fix

Format

ruff format

Type check

pytype

Test

pytest

Project Structure

myapp
├── confs
│   ├── config.yaml
│   └── unit-test.yaml
├── Dockerfile
├── pyproject.toml
├── pytest.ini
├── README.md
├── requirements.txt
├── src
│   ├── config.py
│   ├── constants.py
│   ├── database.py
│   ├── decos.py
│   ├── __init__.py
│   ├── main.py
│   ├── routers
│   │   ├── base.py
│   │   ├── greeting
│   │   │   ├── __init__.py
│   │   │   └── router.py
|   |   |   └── schemas.py
│   │   ├── __init__.py
│   └── utils.py
└── tests
    ├── conftest.py
    ├── __int__.py
    └── test_greeting.py

Development

Update the template code and test it locally. You need to test service and run test before publish.

pip install -e .

# pip
create-fastapi-cli --name myapp --install

# poetry
create-fastapi-cli --name myapp --install --poetry

Testing

Test will create two projects(>=Python 3.10), one is with Poetry, another is with Pip.

Publish

poetry publish --repository deeproute -u <username> -p <password>

Support

If you have any questions or need support, please contact us at yugang.cao12@gmail.com.

Metadata

Release files for create-fastapi-cli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for create-fastapi-cli 0.1.1
File Size Uploaded Provenance
create_fastapi_cli-0.1.1.tar.gz 10.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for create-fastapi-cli 0.1.1
File Interpreter ABI Platform
create_fastapi_cli-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.9 kB

Release files / create_fastapi_cli-0.1.1.tar.gz

Download URL create_fastapi_cli-0.1.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7ae74fb28a15d81febac36bd3ac47768f064b270e7e8da87c35f9bf747a298d6
BLAKE2b-256 checksum
How to use checksums
cf5fe7e14512d0612dff055fc1caa1792701ef2b0182332337564aa3f743a8a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

Release files / create_fastapi_cli-0.1.1-py3-none-any.whl

Download URL create_fastapi_cli-0.1.1-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72d12a4f0f67c8c8bf391a64b75f810bef05ea7e8e76cad5cfb115b462e83ca3
BLAKE2b-256 checksum
How to use checksums
b4826beb31f5b7c6b0944a3bdad43d5faa2102f18c409261336d1f6448c2525a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

Security for create-fastapi-cli 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page