Pymacaron

Star
Logo

A python microservice framework

Reference:

Overview
Quick start
Project files
OpenAPI specification
API objects
Server code
Deployment pipeline
Docker packaging
JWT authentication
Configuration
Error handling
Asynchronous execution
Database serialisation
Testing
Monitoring

Pymacaron

Pymacaron is a python microservice framework based on OpenAPI, pydantic and Flask, using docker for packaging and deployable onto AWS Beanstalk, Google Kubernetes and Google Cloud Run.

Pymacaron vs FastAPI

Pymacaron and FastAPI are quite similar. They are both based on pydantic and they both ensure a strict mapping between OpenAPI specification and actual server code.

But pymacaron takes an OpenAPI-first approach: pymacaron generates pydantic classes and Flask code based on OpenAPI specifications. FastAPI generates OpenAPI specifications based on pydantic classes.

And pymacaron uses Flask, FastAPI does not.

Get started

To create a pymacaron service:

To deploy it as a docker container to AWS or GCP, set a few configuration parameters and run ‘pymdeploy’.

BOOM! Your are live in the cloud!

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 AWS or GCP. It even supports asynchronous execution out of the box!

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

Features

pymacaron provides:

Requirements

Watch the video!

https://youtu.be/bf_dO4Gge8A

Credits

Pymacaron (2016-2022) was created and is maintained by Erwan Lemonnier.