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/kmarov17/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.5.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for fastapi_project_initializer-0.1.5.tar.gz
Algorithm Hash digest
SHA256 55c1f28a7b1019aa9ba583125bd3fc65e9b4951d005b694ba1507763e7b877cf
MD5 1f495f4e75087343696b89af35054b56
BLAKE2b-256 3e40f45b86589b6a766355ac155e8d0332f14d50dce264efc07ee1d81bee99d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_project_initializer-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 24ae2bf78e15cf237ca680ae1044db908a8329205a4eaeb55af29ab6401642fc
MD5 6825076a49c44cf23b633d66f6acc7d5
BLAKE2b-256 055ced771d31180e852139fca09876ef2cf1aefff81c4f0c562a0759d6643b68

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