All Projects → playpauseandstop → Rororo

playpauseandstop / Rororo

Licence: bsd-3-clause
Implement aiohttp.web OpenAPI 3 server applications with schema first approach.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Rororo

Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+41571.58%)
Mutual labels:  openapi, openapi3, asyncio
Fastapi Plugins
FastAPI framework plugins
Stars: ✭ 104 (+9.47%)
Mutual labels:  openapi, openapi3, asyncio
HibiAPI
一个实现了多种常用站点的易用化API的程序 / A program that implements easy-to-use APIs for a variety of commonly used sites.
Stars: ✭ 427 (+349.47%)
Mutual labels:  openapi, asyncio, openapi3
Uvicorn Gunicorn Fastapi Docker
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.
Stars: ✭ 1,014 (+967.37%)
Mutual labels:  openapi, openapi3
Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-13.68%)
Mutual labels:  openapi, openapi3
Rolodex
📇API Documentation Generator for Phoenix
Stars: ✭ 34 (-64.21%)
Mutual labels:  openapi, openapi3
Gnostic
A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks.
Stars: ✭ 870 (+815.79%)
Mutual labels:  openapi, openapi3
Springdoc Openapi
Library for OpenAPI 3 with spring-boot
Stars: ✭ 1,113 (+1071.58%)
Mutual labels:  openapi, openapi3
Php Openapi Faker
Library to generate fake data for OpenAPI request/response/schemas
Stars: ✭ 54 (-43.16%)
Mutual labels:  openapi, openapi3
Raven Aiohttp
An aiohttp transport for raven-python
Stars: ✭ 92 (-3.16%)
Mutual labels:  asyncio, aiohttp
Express Jsdoc Swagger
Swagger OpenAPI 3.x generator
Stars: ✭ 69 (-27.37%)
Mutual labels:  openapi, openapi3
Openapi Spring Webflux Validator
🌱 A friendly kotlin library to validate API endpoints using an OpenApi 3.0 and Swagger 2.0 specification
Stars: ✭ 67 (-29.47%)
Mutual labels:  openapi, openapi3
Pyfailsafe
Simple failure handling. Failsafe implementation in Python
Stars: ✭ 70 (-26.32%)
Mutual labels:  asyncio, aiohttp
Heroku Aiohttp Web
A project starter template for deploying an aiohttp app to Heroku
Stars: ✭ 14 (-85.26%)
Mutual labels:  asyncio, aiohttp
Rocketgram
Modern and powerful asynchronous telegram bot framework.
Stars: ✭ 37 (-61.05%)
Mutual labels:  asyncio, aiohttp
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+822.11%)
Mutual labels:  openapi, openapi3
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+11093.68%)
Mutual labels:  openapi, openapi3
Python Dependency Injector
Dependency injection framework for Python
Stars: ✭ 1,203 (+1166.32%)
Mutual labels:  asyncio, aiohttp
V3n0m Scanner
Popular Pentesting scanner in Python3.6 for SQLi/XSS/LFI/RFI and other Vulns
Stars: ✭ 847 (+791.58%)
Mutual labels:  asyncio, aiohttp
Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+801.05%)
Mutual labels:  openapi, openapi3

====== rororo

.. image:: https://github.com/playpauseandstop/rororo/workflows/ci/badge.svg :target: https://github.com/playpauseandstop/rororo/actions?query=workflow%3A%22ci%22 :alt: CI Workflow

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white :target: https://github.com/pre-commit/pre-commit :alt: pre-commit

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: black

.. image:: https://img.shields.io/pypi/v/rororo.svg :target: https://pypi.org/project/rororo/ :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/rororo.svg :target: https://pypi.org/project/rororo/ :alt: Python versions

.. image:: https://img.shields.io/pypi/l/rororo.svg :target: https://github.com/playpauseandstop/rororo/blob/master/LICENSE :alt: BSD License

.. image:: https://coveralls.io/repos/playpauseandstop/rororo/badge.svg?branch=master&service=github :target: https://coveralls.io/github/playpauseandstop/rororo :alt: Coverage

.. image:: https://readthedocs.org/projects/rororo/badge/?version=latest :target: https://rororo.readthedocs.io/ :alt: Documentation

Implement aiohttp.web_ OpenAPI 3_ server applications with schema first approach.

As well as bunch other utilities to build effective server applications with Python_ 3 & aiohttp.web_.

  • Works on Python_ 3.6+
  • Works with aiohttp.web_ 3.6+
  • BSD licensed
  • Source, issues, and pull requests on GitHub <https://github.com/playpauseandstop/rororo>_

.. _OpenAPI 3: https://spec.openapis.org/oas/v3.0.3 .. _aiohttp.web: https://aiohttp.readthedocs.io/en/stable/web.html .. _Python: https://www.python.org/

Quick Start

rororo relies on valid OpenAPI 3 schema file (both JSON or YAML formats supported).

Example below, illustrates on how to handle operation hello_world from openapi.yaml </tests/openapi.yaml>_ schema file.

.. code-block:: python

from pathlib import Path
from typing import List

from aiohttp import web
from rororo import (
    openapi_context,
    OperationTableDef,
    setup_openapi,
)


operations = OperationTableDef()


@operations.register
async def hello_world(request: web.Request) -> web.Response:
    with openapi_context(request) as context:
        name = context.parameters.query.get("name", "world")
        return web.json_response({"message": f"Hello, {name}!"})


def create_app(argv: List[str] = None) -> web.Application:
    return setup_openapi(
        web.Application(),
        Path(__file__).parent / "openapi.yaml",
        operations,
        server_url="/api",
    )

Schema First Approach

Unlike other popular Python OpenAPI 3 solutions, such as Django REST Framework, FastAPI, flask-apispec, or aiohttp-apispec rororo requires you to provide valid OpenAPI 3_ schema first. This makes rororo similar to connexion, pyramid_openapi3 and other schema first libraries.

.. _Django REST Framework: https://www.django-rest-framework.org .. _FastAPI: https://fastapi.tiangolo.com .. _flask-apispec: https://flask-apispec.readthedocs.io .. _aiohttp-apispec: https://aiohttp-apispec.readthedocs.io .. _connexion: https://connexion.readthedocs.io .. _pyramid_openapi3: https://github.com/Pylons/pyramid_openapi3

Class Based Views

rororo supports class based views <https://docs.aiohttp.org/en/stable/web_quickstart.html#aiohttp-web-class-based-views>_ as well. Todo-Backend </examples/todobackend>_ example illustrates how to use class based views for OpenAPI 3 servers.

In snippet below, rororo expects that OpenAPI 3 schema contains operation
ID UserView.get,

.. code-block:: python

@operations.register
class UserView(web.View):
    async def get(self) -> web.Response:
        ...

More Examples

Check examples </examples>_ folder to see other examples on how to build aiohttp.web OpenAPI 3 server applications.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].