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.2.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.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tidygen-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 6520791124beabf9fb2c964abe6d86ac65466f8de8a47622cf0334e6a2b55f88
MD5 8469a350dc88f570dd611e69bc0cc818
BLAKE2b-256 40aa86989512c0179afebd2eecc69d156ddee14d0dc7810cbdbbc48b5dbbe1fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tidygen-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ff9aa575c2d4a4b965fadc9640de394b9eb47e1f6fc4ed576a38442c61377ee0
MD5 e33b7eb73e2b121d6c25d0c9fda730f9
BLAKE2b-256 5430e8608b483a374a3402d2f65a2806087dcb82856c4c0fb2680fccb1f91574

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