Skip to main content

A tiny CLI for creating a clean project structure.

Project description

Tidy

Overview

The Tidy project is a command-line tool for creating and managing application components in a clean architectural manner.

All dependencies should flow from app > core > entities or app > data > entities. This ensures that the core and data layers are not dependent on each other. However, the adherence to this structure is wholly dependent on the user.

It uses the click library to provide a set of commands for generating application, core, and data classes in specified domains.

Installation

To install the required dependencies, run:

poetry install

Usage

Initialize a New Project

To initialize a new project, use the init command:

python src/tidygen/main.py init -d <destination>

This will create the necessary directory structure and an abstract Operation class.

Create Application Components

Create an Application Class

To create a new application class, use the create command under the app group:

python src/tidygen/main.py app create -d <destination> -e <domain> -n <name>

This will create a new class in the specified domain under the app directory.

Create a Core Class

To create a new core class, use the create command under the core group:

python src/tidygen/main.py core create -d <destination> -e <domain> -n <name>

This will create a new class in the specified domain under the core directory.

Create Data Components

Create a Queries Class

To create a new queries class, use the create_queries command under the data group:

python src/tidygen/main.py data create_queries -d <destination> -e <domain>

This will create a new queries class in the specified domain under the data directory.

Create a Statement Class

To create a new statement class, use the create_statement command under the data group:

python src/tidygen/main.py data create_statement -d <destination> -e <domain>

This will create a new statement class in the specified domain under the data directory.

Directory Structure

The project will generate the following directory structure:

<destination>/
├── app/
│   ├── __init__.py
│   └── <domain>/
│       ├── __init__.py
│       └── <name>.py
├── core/
│   ├── __init__.py
│   └── <domain>/
│       ├── __init__.py
│       └── <name>.py
├── data/
│   ├── __init__.py
│   └── <domain>/
│       ├── __init__.py
│       ├── queries.py
│       └── statements.py
└── entities/
    ├── __init__.py

License

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

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

tidygen-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

tidygen-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file tidygen-0.0.1.tar.gz.

File metadata

  • Download URL: tidygen-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Darwin/23.1.0

File hashes

Hashes for tidygen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2ffb4e74ff883b70eccca91a70203e8ddaa75abcff3d8e1db9b1f573cc961907
MD5 bb6d2779a8a7547d13ba6b23bcd5d9b3
BLAKE2b-256 d853018c8eb529591d84941f2a2bfb1ef4adbc4ac3be08817176c24389f0eef7

See more details on using hashes here.

File details

Details for the file tidygen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tidygen-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Darwin/23.1.0

File hashes

Hashes for tidygen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4d42487011eafbfe4af26d25e289c95a5c9b5c2d62f00059859bbd35d6fd7a7
MD5 13e7b986257cc676e19c7ca5f6c76cbb
BLAKE2b-256 d0fecdfc51b88160bd2215bc3077d7ed7c4d29e1ca73c76622b79119cbc20de0

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