Skip to main content

A CLI tool for generating FastAPI project structure

Project description

cjh-project-builder

Python License

개요

cjh-project-builder은 FastAPI 애플리케이션에서 프로젝트 구조 생성을 자동화해주는 명령어 기반 도구(CLI)입니다. 이 도구는 새로운 모듈을 생성할 때 디렉토리, 파일, 템플릿을 표준화된 형식으로 자동으로 생성하여, 시간을 절약하고 프로젝트 내에서 일관성을 유지할 수 있도록 도와줍니다.

FastAPI 백엔드 모듈을 손쉽게 추가할 수 있도록 설정된 기본 구조를 제공하며, 반복적인 작업을 간편하게 처리할 수 있습니다.

주요 기능

  • FastAPI 프로젝트 모듈 구조를 자동으로 생성
  • 디렉토리 및 파일 템플릿 지원
  • 사용하기 쉬운 CLI 인터페이스 제공
  • 구조 커스터마이징 가능

설치 방법

Poetry로 설치

Poetry를 통해 cjh-project-builder을 설치하려면, 아래 명령어를 사용하세요:

poetry add create-structure user

사용법

설치 후, create-structure user 명령어를 사용하여 새로운 모듈 구조를 생성할 수 있습니다.

예시 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 등).

디렉토리 구조 설명

create-structure user을 사용하여 생성된 모듈 구조는 FastAPI 애플리케이션을 위한 기본적인 구성입니다. 각 모듈에는 도메인 로직, 서비스, 레포지토리, 엔드포인트 등이 포함됩니다.

src/app/<module_name>/
├── __init__.py
├── routes.py
├── container.py
├── domain/
├── endpoint/
├── facades/
├── model/
│   ├── request/
│   ├── response/
├── repository/
├── services/
└── usecase/

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

cjh_project_builder-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

cjh_project_builder-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cjh_project_builder-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.0 Windows/10

File hashes

Hashes for cjh_project_builder-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6fb2931a201d5a8f91105516b1054c70a4cdfb9c4d32175e109bd41e3417db75
MD5 84adadd8e467774eebf9592cee27c634
BLAKE2b-256 6d65586de8533ca52cf0aa34a00fef83436c8a1a0bb8e1e3440cac8b9ff76221

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cjh_project_builder-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c439ee3db1ab4ad11d362e7c96c57a35686d8963aefa63e32c6109e6246dcd9d
MD5 481083d88e5bad5bd1e0abd0f82bf3f2
BLAKE2b-256 602844266730a4e39956513be137b7707715fdca0f1deabe9677bbb3156151a1

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