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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page