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
Built Distribution
File details
Details for the file microservice_template-0.0.6.tar.gz
.
File metadata
- Download URL: microservice_template-0.0.6.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 452bcd1f773635c7303d73c7865e44bd594ee97406bd7d0c55f27187227bd3af |
|
MD5 | e8eb12761d0d1d9dc270526615bb1dbf |
|
BLAKE2b-256 | d78d847e4c252011f35ed9ba765ef038197b2c47758e809ecba86565bf719157 |
File details
Details for the file microservice_template-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: microservice_template-0.0.6-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29b7daad3f03764d07ba70476e11dffccd170d5d61f43508a3c1784467168fba |
|
MD5 | 438e3ad2f3853dcc353b8f9f5a0a4525 |
|
BLAKE2b-256 | 1526510e182f280976a1ea41e92552790cb0b150862b2848ca08a548bacfdd58 |