mkf
A simple CLI tool to generate FastAPI starter projects with a modular structure.
Installation
Install via pip:
pip install mkf
Or install from source:
-
Clone this repository:
git clone <repo_url> cd mkf
-
Install the package:
pip install .
Usage
mkf <project_name>
Replace <project_name> with the name of your new FastAPI project.
What it does
- Creates a directory with the project name
- Generates a modular folder structure for FastAPI
- Adds base files including main.py, models, schemas, etc.
- Sets up a Python virtual environment
- Installs FastAPI and Uvicorn
- Generates requirements.txt
- Initializes a Git repository with an initial commit
Requirements
- Python 3.x
- pip
- git
Example
./mkf my_fastapi_app
cd my_fastapi_app
source .venv/bin/activate
uvicorn app.main:app --reload
Visit http://localhost:8000/docs to see the interactive API documentation.
Project Structure
The generated project has the following structure:
project_name/
├── app/
│ ├── api/
│ │ ├── __init__.py
│ │ └── routes.py
│ ├── core/
│ │ ├── __init__.py
│ │ └── config.py
│ ├── db/
│ │ ├── __init__.py
│ │ └── database.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── user.py
│ ├── schemas/
│ │ ├── __init__.py
│ │ └── user.py
│ └── main.py
├── tests/
│ └── test_main.py
├── .venv/ # Virtual environment
├── requirements.txt
├── README.md
└── .git/ # Git repository
License
MIT
Metadata
Release files for mkf 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkf-0.3.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkf-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / mkf-0.3.0.tar.gz
| Download URL | mkf-0.3.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53b3931378b6480dee52196bd069c9835b50338e9486a74cf9d2611c0448fc86
|
|
BLAKE2b-256 checksum How to use checksums |
e920c3ba9ae3ef7a83690467a0570963b6b11e91e04880246709705f8019381a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / mkf-0.3.0-py3-none-any.whl
| Download URL | mkf-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64ee318a473b8ece84c6360e70a2eef5e9f3f0e905f84b275623d0e780818930
|
|
BLAKE2b-256 checksum How to use checksums |
894001148deb3b169fd70ab6200878ef6172f6ca01527c3f88b06014f8f335c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|