Skip to main content

Python Microservices Library

PyPI version Build Status Coverage Status Requirements Status Total alerts Language grade: Python

PyMS, Python MicroService, is a collections of libraries, best practices and recommended ways to build microservices with Python.

Documentation

To know how use, install or build a project see the docs: https://py-ms.readthedocs.io/en/latest/

Motivation

When we started to create microservice with no idea, we were looking for tutorials, guides, best practices, but we found nothing to create professional projects. Most articles say:

  • "Install flask"
  • "Create routes"
  • (Sometimes) "Create a swagger specs"
  • "TA-DA! you have a microservice"

But... what happens with our configuration out of code like Kubernetes configmap? what happens with transactionality? If we have many microservices, what happens with traces?.

There are many problems around Python and microservices and we can`t find anyone to give a solution.

We start creating these projects to try to solve all the problems we have found in our professional lives about microservices architecture.

Nowadays, is not perfect and we have a looong roadmap, but we hope this library could help other felas and friends ;)

Installation

pip install py-ms

Structure

pyms/config

Module to read yaml or json configuration from a dictionary or a path.

pyms/flask/app

With the function create_app initialize the Flask app, register blueprints and initialize all libraries such as Swagger, database, trace system, custom logger format, etc.

pyms/flask/services

Integrations and wrappers over common libs like request, swagger, connexion

pyms/flask/healthcheck

This view is usually used by Kubernetes, Eureka and other systems to check if our application is running.

pyms/logger

Print logger in JSON format to send to server like Elasticsearch. Inject span traces in logger.

pyms/tracer

Create an injector flask_opentracing.FlaskTracer to use in our projects.

How To Contrib

We appreciate opening issues and pull requests to make PyMS even more stable & useful! See This doc for more details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-ms-1.2.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

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

py_ms-1.2.0-py3-none-any.whl (71.8 kB view details)

Uploaded Python 3

File details

Details for the file py-ms-1.2.0.tar.gz.

File metadata

  • Download URL: py-ms-1.2.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for py-ms-1.2.0.tar.gz
Algorithm Hash digest
SHA256 cef83246d16ce1b817b5951f2f0b471b7bfc1f40c2d38419746b9d37e2ef8e43
MD5 176d93d9c2e7fef6b4f3978269d9dff2
BLAKE2b-256 5aca80171fbb7e0a2269df9cd609015c1e44ab2e1bc460d3c8268f7d63826a7f

See more details on using hashes here.

File details

Details for the file py_ms-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: py_ms-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 71.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for py_ms-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a08e91fe5ece525a639d14e039c0c039c2e3f71f875e150533236d90c9a614ac
MD5 5dee2b9503561511444308ee56744039
BLAKE2b-256 315e02099522a79f9b349d80026ad3a69b4e6af753994119326f11aa2343f7e3

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 Sentry Error logging StatusPage Status page