Skip to main content

Automatically generate a hexagonal architecture project structure for microservices in Python.

Project description

Microservice Setup

Overview

Microservice Setup is a Python-based Command-Line Interface (CLI) tool aimed to auto-generate a domain-driven, scalable, and maintainable microservices directory structure based on hexagonal architecture.

Features

  • Auto-generates a clean and scalable microservices project skeleton
  • Built around hexagonal architecture principles
  • Allows for easy customization to include user-defined modules
  • Works with Python 3.9 or later

Installation

Via pip

pip install microservice_setup

Clone Repository

Clone this repository and navigate into the directory:

git clone https://github.com/DoMo-98/microservice_setup.git
cd microservice_setup

Usage

After installation, you can initialize your microservices project in one of two ways:

  1. Via pip installation:

    ms-init example
    
  2. Via Python module:

    python -m src.main example
    

Follow the prompts to set up your project.

Generated Structure

When you run microservice_setup, the following directory structure will be generated:

example_service/
├── app/
│   ├── adapters/
│   │   ├── controllers/
│   │   └── serializers/
│   ├── application/
│   │   ├── services/
│   │   └── use_cases/
│   ├── common/
│   │   └── constants/
│   └── domain/
│       ├── entities/
│       ├── exceptions/
│       └── interfaces/
├── config/
├── constants/
├── main.py
├── requirements/
├── templates/
└── tests/
    ├── adapters/
    │   ├── controllers/
    │   └── serializers/
    ├── application/
    │   ├── services/
    │   └── use_cases/
    ├── common/
    │   └── constants/
    └── domain/
        ├── entities/
        ├── exceptions/
        └── interfaces/

This structure adheres to the principles of hexagonal architecture and DDD, providing a clear and maintainable outline for your microservice.

Requirements

  • Python 3.9 or later

Dependencies

To be added based on your project's needs.

Author

  • Éric Dominguez Morales - Initial Work - Email

License

This project is licensed under the MIT License - see the LICENSE.md 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

microservice_setup-0.2.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

microservice_setup-0.2.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file microservice_setup-0.2.1.tar.gz.

File metadata

  • Download URL: microservice_setup-0.2.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.4.15-200.fc38.x86_64

File hashes

Hashes for microservice_setup-0.2.1.tar.gz
Algorithm Hash digest
SHA256 180c22549e54fb1e51d96c2c02af5472679894b9d53acc2039f0e9750603a677
MD5 6239b9f31816fe393cd1a0ffd3a23709
BLAKE2b-256 1ea661894016c106c2b14fa5b4793c389d401d2828ff461ada8a38b874676ef9

See more details on using hashes here.

File details

Details for the file microservice_setup-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: microservice_setup-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.4.15-200.fc38.x86_64

File hashes

Hashes for microservice_setup-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e16964843818f3bd9e400525de87b6360a3df8fb739e2347dc06e4327843d478
MD5 fe3de39274ea762d31ad69e27e0bd9a9
BLAKE2b-256 7a4d625884a5d5f7dbe4ccf91bf8e9284a3d21f9d664c3d4fdd59c9f5bd63320

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