Skip to main content

A simple FastAPI factory for creating FastAPI applications.

Project description

FastAPI Builder

FastAPI Crafter is a command-line tool designed to streamline the creation of well-organized file structures for FastAPI projects. It enables developers to kickstart their projects with best practices in mind, reducing boilerplate and setup time.

Features

  • Automated File Structure Creation: Generate a production-ready project structure in seconds.
  • Customizable Templates: Define your own templates to suit your development style.
  • Extensible Commands: Add custom commands to extend functionality.
  • User-Friendly Interface: Simple CLI commands for intuitive usage.

Installation

Install FastAPI Crafter via pip:

pip install fastapify

Usage

Initialize a New Project

To create a new FastAPI project, run:

fastapify init my-fastapi-project

This will scaffold a directory structure with the following layout:

my-fastapi-project/
├── app/
│   ├── main.py
│   ├── routers/
│   │   └── __init__.py
│   ├── models/
│   │   └── __init__.py
│   └── utils/
│       └── __init__.py
├── tests/
│   └── test_main.py
├── requirements.txt
└── README.md

Add a Router

Easily add new routers to your project:

fastapify add-router users

This creates app/routers/users.py with a basic template.

Generate Models

To add a new database model:

fastapify add-model User

This generates a User model in app/models/user.py.


Configuration

FastAPI Crafter allows you to customize the project structure and templates. You can create a .fastapi-crafter.json file in your project root to define your preferences.

Example configuration:

{
  "project_name": "my_fastapi_project",
  "directories": [
    "app/routers",
    "app/models",
    "app/utils",
    "tests"
  ],
  "files": {
    "app/main.py": "templates/main.py",
    "requirements.txt": "templates/requirements.txt"
  }
}

Contributing

Contributions are welcome! If you have ideas for new features or improvements, feel free to fork the repository and create a pull request.

  1. Fork the repository
  2. Create a new branch
  3. Commit your changes
  4. Push to the branch
  5. Open a pull request

License

FastAPI Crafter is open-source software licensed under the MIT License. See the LICENSE file for details.


Acknowledgments

  • Inspired by the simplicity and power of FastAPI.
  • Thanks to the open-source community for providing valuable resources and inspiration.

Get started today with FastAPI Crafter and make your API development fast, efficient, and fun!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapify-0.0.14.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapify-0.0.14-py2.py3-none-any.whl (8.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fastapify-0.0.14.tar.gz.

File metadata

  • Download URL: fastapify-0.0.14.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for fastapify-0.0.14.tar.gz
Algorithm Hash digest
SHA256 9186d99cc8a42e478cae09e5722f4dea175d47b4eef4745285c047193c130cb0
MD5 c5bb6e6db161d0aee6aa3e05f9cf0b9d
BLAKE2b-256 59f5f9fca39ac569ae85f144abe3d1c1f0f5a35e14791a0306d96214cc66ef94

See more details on using hashes here.

File details

Details for the file fastapify-0.0.14-py2.py3-none-any.whl.

File metadata

  • Download URL: fastapify-0.0.14-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for fastapify-0.0.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 365e65ba271cafed5f8035f319a1e50374a389a778cb4409ab7e2769ce8edbc1
MD5 8d7ac98d2bbd1f6eb86bf8d2de31c291
BLAKE2b-256 2b09e32e64787cc01156142290ce2953c2daff257a3c5693587c84725bd84aed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page