FastAPI-fastkit: Fast, easy-to-use starter kit for new users of Python and FastAPI
This project was created to speed up the configuration of the development environment needed to develop Python-based web apps for new users of Python and FastAPI.
This project was inspired by the SpringBoot initializer
& Python Django's django-admin
cli operation.
- Immediate FastAPI project creation : Super-fast FastAPI workspace & project creation via CLI, inspired by
django-admin
feature of Python Django - Prettier CLI outputs : beautiful CLI experiment (rich library feature)
- Standards-based FastAPI project template : All FastAPI-fastkit templates are based on Python standards and FastAPI's common use
Install FastAPI-fastkit
at your Python environment.
$ pip install FastAPI-fastkit
---> 100%
You can now start new FastAPI project really fast with FastAPI-fastkit!
Create a new FastAPI project workspace immediately with:
$ fastkit init
Enter the project name: my-awesome-project
Enter the author name: John Doe
Enter the author email: john@example.com
Enter the project description: My awesome FastAPI project
Project Information
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Project Name โ my-awesome-project โ
โ Author โ John Doe โ
โ Author Email โ john@example.com โ
โ Description โ My awesome FastAPI project โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Available Stacks and Dependencies:
MINIMAL Stack
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ Dependency 1 โ fastapi โ
โ Dependency 2 โ uvicorn โ
โ Dependency 3 โ pydantic โ
โ Dependency 4 โ pydantic-settings โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
STANDARD Stack
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ Dependency 1 โ fastapi โ
โ Dependency 2 โ uvicorn โ
โ Dependency 3 โ sqlalchemy โ
โ Dependency 4 โ alembic โ
โ Dependency 5 โ pytest โ
โ Dependency 6 โ pydantic โ
โ Dependency 7 โ pydantic-settings โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
FULL Stack
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ Dependency 1 โ fastapi โ
โ Dependency 2 โ uvicorn โ
โ Dependency 3 โ sqlalchemy โ
โ Dependency 4 โ alembic โ
โ Dependency 5 โ pytest โ
โ Dependency 6 โ redis โ
โ Dependency 7 โ celery โ
โ Dependency 8 โ pydantic โ
โ Dependency 9 โ pydantic-settings โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
Select stack (minimal, standard, full): minimal
Do you want to proceed with project creation? [y/N]: y
FastAPI project will deploy at '~your-project-path~'
โญโโโโโโโโโโโโโโโโโโโโโโโโ Info โโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โน Injected metadata into setup.py โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโ Info โโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โน Injected metadata into config file โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Creating Project:
my-awesome-project
โโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ Component โ Collected โ
โ fastapi โ โ โ
โ uvicorn โ โ โ
โ pydantic โ โ โ
โ pydantic-settings โ โ โ
โโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโ
Creating virtual environment...
โญโโโโโโโโโโโโโโโโโโโโโโโโ Info โโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โน venv created at โ
โ ~your-project-path~/my-awesome-project/.venv โ
โ To activate the virtual environment, run: โ
โ โ
โ source โ
โ ~your-project-path~/my-awesome-project/.venv/bin/act โ
โ ivate โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Installing dependencies...
โ Setting up project environment...Collecting <packages~>
---> 100%
โญโโโโโโโโโโโโโโโโโโโโโโโ Success โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โจ Dependencies installed successfully โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโ Success โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โจ FastAPI project 'my-awesome-project' has been โ
โ created successfully and saved to โ
โ ~your-project-path~! โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโ Info โโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โน To start your project, run 'fastkit runserver' at โ
โ newly created FastAPI project directory โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
This command will create a new FastAPI project workspace environment with Python virtual environment.
FastAPI-fastkit
makes it easy to expand your FastAPI project.
Add a new route endpoint to your FastAPI project with:
$ fastkit addroute my-awesome-project user
Adding New Route
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Project โ my-awesome-project โ
โ Route Name โ user โ
โ Target Directory โ ~your-project-path~ โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Do you want to add route 'user' to project 'my-awesome-project'? [Y/n]: y
โญโโโโโโโโโโโโโโโโโโโโโโโโ Info โโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โน Updated main.py to include the API router โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโ Success โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โจ Successfully added new route 'user' to project โ
โ `my-awesome-project` โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
You can also start with a structured FastAPI demo project.
Demo projects are consist of various tech stacks with simple item CRUD endpoints implemented.
Place a structured FastAPI demo project immediately with:
$ fastkit startdemo
Enter the project name: my-awesome-demo
Enter the author name: John Doe
Enter the author email: john@example.com
Enter the project description: My awesome FastAPI demo
Deploying FastAPI project using 'fastapi-default' template
Template path:
/~fastapi_fastkit-package-path~/fastapi_project_template/fastapi-default
Project Information
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Project Name โ my-awesome-demo โ
โ Author โ John Doe โ
โ Author Email โ john@example.com โ
โ Description โ My awesome FastAPI demo โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโ
Template Dependencies
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ Dependency 1 โ fastapi โ
โ Dependency 2 โ uvicorn โ
โ Dependency 3 โ pydantic โ
โ Dependency 4 โ pydantic-settings โ
โ Dependency 5 โ python-dotenv โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
Do you want to proceed with project creation? [y/N]: y
FastAPI template project will deploy at '~your-project-path~'
---> 100%
โญโโโโโโโโโโโโโโโโโโโโโโโ Success โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โจ Dependencies installed successfully โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโ Success โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โจ FastAPI project 'my-awesome-demo' from โ
โ 'fastapi-default' has been created and saved to โ
โ ~your-project-path~! โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
To view the list of available FastAPI demos, check with:
$ fastkit list-templates
Available Templates
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ fastapi-custom-response โ Async Item Management API with โ
โ โ Custom Response System โ
โ fastapi-dockerized โ Dockerized FastAPI Item โ
โ โ Management API โ
โ fastapi-empty โ No description โ
โ fastapi-async-crud โ Async Item Management API Server โ
โ fastapi-psql-orm โ Dockerized FastAPI Item โ
โ โ Management API with PostgreSQL โ
โ fastapi-default โ Simple FastAPI Project โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
We welcome contributions from the community! FastAPI-fastkit is designed to help newcomers to Python and FastAPI, and your contributions can make a significant impact.
If you want to contribute to this project, we've made it easy to get started:
- Quick Development Setup:
fork or clone this repository:
git clone https://github.com/bnbong/FastAPI-fastkit.git
cd FastAPI-fastkit
make dev-setup
- Available Development Commands:
This project uses Makefile to manage the development process.
You can use the following commands to help you get started:
make help # See all available commands
make dev-check # Run all checks before submitting
make quick-test # Quick test after changes
- Read our contribution guidelines:
For other contribution guidelines, please refer to the following files:
- CONTRIBUTING.md - Detailed contribution guide
- CODE_OF_CONDUCT.md - Project principles
- SECURITY.md - Security guidelines
- ๐ New FastAPI templates - Add templates for different use cases
- ๐ Bug fixes - Help us improve stability and reliability
- ๐ Documentation - Improve guides, examples, and translations
- ๐งช Tests - Increase test coverage and add integration tests
- ๐ก Features - Suggest and implement new CLI features
FastAPI-fastkit aims to provide a fast and easy-to-use starter kit for new users of Python and FastAPI.
This idea was initiated with the aim of full fill to help FastAPI newcomers to learn from the beginning, which is the production significance of the FastAPI-cli package added with the FastAPI 0.111.0 version update.
As one person who has been using and loving FastAPI for a long time, I wanted to develop a project that could help me a little bit to practice the wonderful motivation that FastAPI developer tiangolo has.
This project is licensed under the MIT License - see the LICENSE file for details.