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.3.1.tar.gz (28.7 kB view details)

Uploaded Source

Built Distributions

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

py_ms-1.3.1-py3.6.egg (75.9 kB view details)

Uploaded Egg

py_ms-1.3.1-py3-none-any.whl (72.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py-ms-1.3.1.tar.gz
  • Upload date:
  • Size: 28.7 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.3.1.tar.gz
Algorithm Hash digest
SHA256 d3c238ace70309e0865f6ed96806b66ddc08b7217ce692b5530d3dbd268f257b
MD5 07751be18d1cf7129572213fc33b7145
BLAKE2b-256 fe05bf142dce7178e1bc0f3d821fd4ead65fb367035a45aec805b583a34d4708

See more details on using hashes here.

File details

Details for the file py_ms-1.3.1-py3.6.egg.

File metadata

  • Download URL: py_ms-1.3.1-py3.6.egg
  • Upload date:
  • Size: 75.9 kB
  • Tags: Egg
  • 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.3.1-py3.6.egg
Algorithm Hash digest
SHA256 9348c7cc870fe9255f72a9b09ba141c94b47951af05808356368e321dfd6045a
MD5 b13bf4dcf34c8273ad038bf5da3f393c
BLAKE2b-256 7951da2fa9df4188a19b11e290caea0afb0fc9fa7a6329b5b1add715f3d7075d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_ms-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 72.2 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e67a03d693e1a8a69bb4245b38d7f78c0848ccb9134a3bc10c2f146b3b10e2d5
MD5 5b3b15be3044aca11c6ad64aa98d82cc
BLAKE2b-256 dea5b981a98a1438e997bd7f7a093a48cf765151206900f2f297f6396ffd7f2a

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