PyMacaron

Star
Logo

A python microservice framework

Reference:

Overview
Get started
Write an API specification
Implement your API
Docker packaging
Deploy to AWS Beanstalk
JWT authentication
Configuration
Error handling
Asynchronous execution
Database serialisation
Testing
Monitoring

What is PyMacaron?

A python microservice framework based on Flask and Swagger, using docker for packaging and deployable on AWS/beanstalk.

Microservices made easy

Create a Flask-based microservice running your REST/json api by doing:

To deploy it as a docker container on Amazon Beanstalk, set a few configuration parameters and run ‘deploy_pipeline’.

BOOM! Your are live on Amazon AWS!

PyMacaron abstracts away all the scaffholding of structuring your Python app, defining routes, serializing/deserializing between json, Python objects and databases, containerizing your app and deploying it on Amazon. It even supports asynchronous execution out of the box!

PyMacaron lets you focus on what matters: defining and implementing your API.

The PyMacaron ecosystem

pymacaron uses pymacaron-core which takes a swagger/OpenAPI yaml specification and starts a Flask app implementing it.

pymacaron uses pymacaron-aws to package the microservice into a Docker container and deploy it to Amazon Elastic Beanstalk.

pymacaron uses pymacaron-unit to execute blackbox acceptance tests against your live/dev microservice.

pymacaron-async allows you to execute asynchronous tasks triggered by API calls.

pymacaron-dynamodb implements seamless serialisation between DynamoDB and API objects.

Features

pymacaron gives you:

Requirements

PyMacaron requires Python3.

To deploy a pymacaron service, you will need access to a docker repository and an Amazon AWS account.

Credits

PyMacaron was created and is maintained by Erwan Lemonnier.