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 HTTP client for consuming OpenAPI-based services.
WARNING: This is still very much work in progress and not quite ready for production usage. Until version 1.0 is released, any version can be expected to break backward compatibility.
Quick Start
Server
from pyotr.server import Application
from some.path import endpoints
app = Application.from_file("path/to/openapi.yaml", module=endpoints)
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.8.0.tar.gz
(9.1 kB
view details)
Built Distribution
pyotr-0.8.0-py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file pyotr-0.8.0.tar.gz
.
File metadata
- Download URL: pyotr-0.8.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-37-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12bf38850548681b7450d9b87427f15a1c85882dc8d224006b7a3f6f63e54a3b |
|
MD5 | db0c7b3eccf0f0948063d27f83d276fc |
|
BLAKE2b-256 | aee48ac02f72f8f5ba81ba25003899f169b6cb9ac7e727ed562dcba3a6d1bffe |
File details
Details for the file pyotr-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: pyotr-0.8.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-37-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23afebf4168af718fa44e435e32237f83b89f51fb18733849604403ab39a1be0 |
|
MD5 | f3f6e10249fd755a515f8285934005b8 |
|
BLAKE2b-256 | 82858b2a79b5260a15737c35300d92c77b761ddd03ad727f00991b589a4378a5 |