https://github.com/bnbong/fastapi-fastkit
<Open Source> Fast, easy-to-use starter kit for new users of Python and FastAPI
https://github.com/bnbong/fastapi-fastkit
application fastapi fastapi-sqlalchemy fastapi-template initializer open-source orm postgresql pydantic pydantic-v2 python sqlalchemy-orm sqlmodel template-project uvicorn
Last synced: 26 days ago
JSON representation
<Open Source> Fast, easy-to-use starter kit for new users of Python and FastAPI
- Host: GitHub
- URL: https://github.com/bnbong/fastapi-fastkit
- Owner: bnbong
- License: mit
- Created: 2024-10-08T04:17:03.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T09:53:06.000Z (3 months ago)
- Last Synced: 2025-05-02T15:43:02.757Z (about 1 month ago)
- Topics: application, fastapi, fastapi-sqlalchemy, fastapi-template, initializer, open-source, orm, postgresql, pydantic, pydantic-v2, python, sqlalchemy-orm, sqlmodel, template-project, uvicorn
- Language: Python
- Homepage:
- Size: 698 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Security: SECURITY.md
Awesome Lists containing this project
README
![]()
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](https://github.com/fastapi/fastapi).
This project was inspired by the `SpringBoot initializer` & Python Django's `django-admin` cli operation.
## Key Features
- **Immediate FastAPI project creation** : Super-fast FastAPI workspace & project creation via CLI, inspired by `django-admin`feature of [Python Django](https://github.com/django/django)
- **Prettier CLI outputs** : beautiful CLI experiment ([rich library](https://github.com/Textualize/rich) feature)
- **Standards-based FastAPI project template** : All FastAPI-fastkit templates are based on Python standards and FastAPI's common use## Installation
Install `FastAPI-fastkit` at your Python environment.
```console
$ pip install FastAPI-fastkit---> 100%
```## Usage
### Create a new FastAPI project workspace environment immediately
You can now start new FastAPI project really fast with FastAPI-fastkit!
Create a new FastAPI project workspace immediately with:
```console
$ fastkit init
Enter the project name:
Enter the author name:
Enter the author email:
Enter the project description:Available Stacks and Dependencies:
MINIMAL Stack
┌──────────────┬─────────┐
│ Dependency 1 │ fastapi │
│ Dependency 2 │ uvicorn │
└──────────────┴─────────┘STANDARD Stack
┌──────────────┬────────────┐
│ Dependency 1 │ fastapi │
│ Dependency 2 │ uvicorn │
│ Dependency 3 │ sqlalchemy │
│ Dependency 4 │ alembic │
│ Dependency 5 │ pytest │
└──────────────┴────────────┘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 │ docker-compose │
└──────────────┴────────────────┘Select stack (minimal, standard, full): minimal
Creating Project:
new-fastapi-project
┌───────────┬────────┐
│ Component │ Status │
│ fastapi │ ✓ │
│ uvicorn │ ✓ │
└───────────┴────────┘
Creating virtual environment...
Installing dependencies...
⠙ Setting up project environment...Collecting---> 100%
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Success ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✨ Dependencies installed successfully │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Success ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✨ FastAPI project '' has been created successfully and saved to ''! │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 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.
### Add a new route to the FastAPI project
`FastAPI-fastkit` makes it easy to expand your FastAPI project.
Add a new route endpoint to your FastAPI project with:
```console
$ fastkit addroute---> 100%
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ℹ Updated main.py to include the API router │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Success ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✨ Successfully added new route '' to project ''. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```### Place a structured FastAPI demo project immediately
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:
```console
$ fastkit startdemo
Enter the project name:
Enter the author name:
Enter the author email:
Enter the project description:
Deploying FastAPI project using 'fastapi-default' template
Template path:
//fastapi_project_template/fastapi-defau
ltProject Information
┌──────────────┬──────────────────────────────────────────┐
│ Project Name │ │
│ Author │ │
│ Author Email │ │
│ Description │ │
└──────────────┴──────────────────────────────────────────┘Do you want to proceed with project creation? [y/N]: y
FastAPI template project will deploy at ''---> 100%
╭─────────────────────────────────────────────────────────────────── Success ────────────────────────────────────────────────────────────────────╮
│ ✨ FastAPI project '' from 'fastapi-default' has been created and saved to │
│ ! │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```To view the list of available FastAPI demos, check with:
```console
$ fastkit list-templates
```## Significance of FastAPI-fastkit
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](https://github.com/fastapi/fastapi/releases/tag/0.111.0).
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](https://github.com/fastapi/fastapi/pull/11522#issuecomment-2264639417) that FastAPI developer [tiangolo](https://github.com/tiangolo) has.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
@author bnbong [email protected]