Skip to main content

Microservicetemplate

Project description

Microservice-Template

Microservice-Template is a Python module that provides a simple template class for creating microservices using the Flask web framework. This template class is designed to streamline the process of creating microservices by providing common functionality that is often repeated in microservice development.

Features

  • Provides a base class, Microservice, which includes a basic Flask application setup with CORS support.
  • Allows microservices to easily define routes and endpoints with minimal boilerplate code.
  • Encourages best practices for microservice development, making it easier to maintain and scale microservices.

Usage

To use the Microservice-Template in your microservice project, simply inherit from the Microservice class and add your custom routes and endpoints. The template class takes care of the core setup, allowing you to focus on the specific functionality of your microservice.

from microservice_template import Microservice

class MyMicroservice(Microservice):
    def __init__(self):
        super().__init__("my-service", 5000)

    def custom_route(self):
        # Define your custom route logic here

if __name__ == '__main__':
    my_service = MyMicroservice()
    my_service.run()

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_template-0.0.6.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

microservice_template-0.0.6-py3-none-any.whl (2.7 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