Skip to main content

A library to initialize a FastAPI project

Project description

FastAPI Project Initializer

The fastapi_project_initializer library provides an easy way to initialize a FastAPI project by cloning a GitHub repository, creating a virtual environment, and installing dependencies. This library simplifies the setup process, allowing you to quickly get started with a standardized FastAPI project structure.

By
    ***   ***   ******   ******   ***********   ***********   **********   ***  ***
    ***  **     ******   ******   ***********   ***     ***   **********   ***  ***
    ******      *** *** *** ***   ***     ***   ***     ***   ***    ***   ***  ***
    ******      ***   ***   ***   ***********   *********     ***    ***   ***  ***
    ***  **     ***    *    ***   ***     ***   ***     **    **********    **  **
    ***   ***   ***         ***   ***     ***   ***     ***   **********     ****

Features

  • Clone a specified GitHub repository
  • Create a virtual environment
  • Install dependencies from requirements.txt
  • Easy-to-use command-line interface (CLI)

Installation

To install the fastapi_project_initializer library, run:

pip install fastapi_project_initializer

Usage

To initialize a new FastAPI project, use the fastapi-init command followed by the name of your project:

fastapi-init project_name

This command will:

  • Clone the default FastAPI project repository.
  • Create a virtual environment.
  • Install the dependencies listed in requirements.txt.

Example

fastapi-init my_fastapi_project

This will create a new FastAPI project in the my_fastapi_project directory.

Project Structure

The initialized project will have the following structure:

my_fastapi_project/
│
├── app/
│   ├── configs/           # Application configuration files
│   ├── models/            # Data model files
│   ├── routes/            # Routing (routes) files
│   ├── services/          # Application service files
│   └── utils/             # Utilities and tools
├── tests/                 # Unit test files for the application
├── main.py                # Main application entry point
├── requirements.txt       # File listing the Python dependencies
├── .gitignore             # File to ignore specific files/folders in git
└── README.md              # Project documentation

Development

To contribute to this project, follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

Setting Up for Development

Clone the repository:

git clone https://github.com/yourusername/fastapi_project_initializer.git
cd fastapi_project_initializer

Create a virtual environment:

python -m venv venv

Activate the virtual environment:

  • On Windows:
venv\Scripts\activate
  • On macOS/Linux:
source venv/bin/activate

Install the dependencies:

pip install -r requirements.txt

License

This project is licensed under the MIT License. See the LICENSE file for more information.

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

fastapi_project_initializer-0.1.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file fastapi_project_initializer-0.1.2.tar.gz.

File metadata

File hashes

Hashes for fastapi_project_initializer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4c7623545eacfab33b61c7d08d071c7ff7416afa202a0e53707dfef49c371ada
MD5 dcb474e3e8117123cefc088839eed353
BLAKE2b-256 de238fab4ecfe4f3bc0df83aa4d075de599d1ae82f0066d1de021866c3f27277

See more details on using hashes here.

File details

Details for the file fastapi_project_initializer-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_project_initializer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2923a5803686741e3616ff07e3d353f6514957a2ff0a5032b90376fb54255530
MD5 2ee280877e8604630de2d2ef68f883b8
BLAKE2b-256 48fe5aeaa6f53dbc36587a6f831841b397c116d26cb4d878b496e99b17f8ddf2

See more details on using hashes here.

Supported by

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