Python OpenAPI-to-REST (and back) framework
Project description
Pyotr
Pyotr is a Python library for serving and consuming REST APIs based on OpenAPI specifications. Its name is acronym of "Python OpenAPI to REST".
The project consists of two separate libraries that can be used independently:
pyotr.server
is a Starlette-based framework for serving OpenAPI-based services. It is functionally very similar to connexion, except that it aims to be fully ASGI-compliant.pyotr.client
is a simple HTTP client for consuming OpenAPI-based services.
WARNING: This is still very much work in progress and not nearly ready for any kind of production.
Quick Start
Server
from pyotr.server import Application
app = Application.from_file("path/to/openapi.yaml", "path.to.endpoints.module")
Client
from pyotr.client import Client
client = Client.from_file("path/to/openapi.yaml")
result = client.some_endpoint_id("path", "variables", "query_var"="example")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyotr-0.1.7.tar.gz
(6.6 kB
view hashes)
Built Distribution
pyotr-0.1.7-py3-none-any.whl
(8.4 kB
view hashes)