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:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - 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
Built Distribution
File details
Details for the file fastapi_project_initializer-0.1.5.tar.gz
.
File metadata
- Download URL: fastapi_project_initializer-0.1.5.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c1f28a7b1019aa9ba583125bd3fc65e9b4951d005b694ba1507763e7b877cf |
|
MD5 | 1f495f4e75087343696b89af35054b56 |
|
BLAKE2b-256 | 3e40f45b86589b6a766355ac155e8d0332f14d50dce264efc07ee1d81bee99d6 |
File details
Details for the file fastapi_project_initializer-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: fastapi_project_initializer-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24ae2bf78e15cf237ca680ae1044db908a8329205a4eaeb55af29ab6401642fc |
|
MD5 | 6825076a49c44cf23b633d66f6acc7d5 |
|
BLAKE2b-256 | 055ced771d31180e852139fca09876ef2cf1aefff81c4f0c562a0759d6643b68 |