A CLI tool for generating FastAPI project structure
Project description
cjh-project-builder
개요
cjh-project-builder은 FastAPI 애플리케이션에서 프로젝트 구조 생성을 자동화해주는 명령어 기반 도구(CLI)입니다. 이 도구는 새로운 모듈을 생성할 때 디렉토리, 파일, 템플릿을 표준화된 형식으로 자동으로 생성하여, 시간을 절약하고 프로젝트 내에서 일관성을 유지할 수 있도록 도와줍니다.
FastAPI 백엔드 모듈을 손쉽게 추가할 수 있도록 설정된 기본 구조를 제공하며, 반복적인 작업을 간편하게 처리할 수 있습니다.
주요 기능
- FastAPI 프로젝트 모듈 구조를 자동으로 생성
- 디렉토리 및 파일 템플릿 지원
- 사용하기 쉬운 CLI 인터페이스 제공
- 구조 커스터마이징 가능
설치 방법
Poetry로 설치
Poetry를 통해 cjh-project-builder을 설치하려면, 아래 명령어를 사용하세요:
poetry add myprojectgen
사용법
설치 후, myprojectgen 명령어를 사용하여 새로운 모듈 구조를 생성할 수 있습니다.
예시 user라는 이름의 새로운 모듈 구조를 생성하려면 다음 명령어를 입력합니다:
cjh-project-builder create-structure user
이 명령어를 실행하면 다음과 같은 디렉토리 구조가 생성됩니다:
src/
└── app/
└── user/
├── __init__.py
├── routes.py
├── container.py
├── domain/
│ ├── __init__.py
│ └── user_entity.py
├── endpoint/
│ ├── __init__.py
│ └── user.py
├── facades/
│ ├── __init__.py
│ └── user_facade.py
├── model/
│ ├── request/
│ │ ├── __init__.py
│ │ └── user_request.py
│ └── response/
│ ├── __init__.py
│ └── user_response.py
├── repository/
│ ├── __init__.py
│ └── user_repository.py
├── services/
│ ├── __init__.py
│ └── user_service.py
└── usecase/
├── __init__.py
└── user_usecase.py
CLI 명령어
create-structure
cjh-project-builder create-structure <module_name>
module_name: 생성할 모듈의 이름을 입력합니다 (예: user, order 등).
디렉토리 구조 설명
MyProjectGen을 사용하여 생성된 모듈 구조는 FastAPI 애플리케이션을 위한 기본적인 구성입니다. 각 모듈에는 도메인 로직, 서비스, 레포지토리, 엔드포인트 등이 포함됩니다.
src/app/<module_name>/
├── __init__.py
├── routes.py
├── container.py
├── domain/
├── endpoint/
├── facades/
├── model/
│ ├── request/
│ ├── response/
├── repository/
├── services/
└── usecase/
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cjh_project_builder-0.1.1.tar.gz.
File metadata
- Download URL: cjh_project_builder-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f6f9c9d9c049dfc6bbb1db6f17bf1c748488c4e583c47030252b8b1f5b80431
|
|
| MD5 |
4362ecf540b80579aac440a4f18d0cff
|
|
| BLAKE2b-256 |
756fa0dc816950f113891aad3e8c068051ed7da16c46a72a99cfaa781fa87673
|
File details
Details for the file cjh_project_builder-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cjh_project_builder-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b93250daabb76e7c04776f9b74937d10552bf13979ed21e757f2a675434d5bea
|
|
| MD5 |
29767709711849c4ca55ed128e1f0a95
|
|
| BLAKE2b-256 |
96ae6068b2acdf182c214146d26a4998432e671a4864f53de23447b3c747a720
|