Implement aiohttp.web OpenAPI 3 server applications with schema first approach.
BSD-3-CLAUSE License
Bot releases are visible (Hide)
Published by github-actions[bot] 2 months ago
The latest rororo version allows to install library alongside latest version of attrs
& email-validator
and require latest environ-config
version. On top of that rororo==3.2.0
ensure that web.HTTPRedirection
errors will not handled by error middleware and will result in proper redirects.
environ-config@^23.2.0
(#360)setup_settings_from_environ
function works well (#361)Published by github-actions[bot] almost 2 years ago
Full Changelog: https://github.com/playpauseandstop/rororo/compare/v3.0.1...v3.1.0
Published by github-actions[bot] almost 2 years ago
This release ensures dependency on openapi-spec-validator<=0.4.0
, so now it is safe to run poetry update
in projects, which depends on rororo==3.0.1
. Previously, poetry update
has been installed latest openapi-spec-validator==0.5.1
and as side-effect introduce ImportError: cannot import name 'default_handlers' from 'openapi_spec_validator'
to the project 😢
Full Changelog: v3.0.0...v3.0.1
Published by github-actions[bot] about 2 years ago
rororo==3.0.0
release drops Python 3.6 support, as well as ensures that latest versions of dependent libraries, such as attrs
, aiohttp-middlewares
, and environ-config
can be installed alongside rororo.
Published by github-actions[bot] almost 3 years ago
Maintenance release, which in same time ensures that rororo
installs typing-extensions
only for Python <3.8. Thanks @q0w for contribution.
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Use Python 3.10 as dev version, as well as update minimum supported openapi-core
version to 0.13.4.
Also loose a bit pyrsistent
& PyYAML
requirements to allow dependent projects use latest versions of given libraries.
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
This release allows to install latest versions of,
attrs
environ-config
As well as depend on only supported version of openapi-core
library, which ensures that poetry version
do not install unsupported version of openapi-core
.
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] about 4 years ago
attrs>=19.1,<21
to allow install attrs==20.1.0
in dependent projectssrc/
directory, use latest pytest
for tests, better Makefile
targets, etcPublished by github-actions[bot] about 4 years ago
openapi-core==0.13.4
Published by github-actions[bot] over 4 years ago
Final 2.0.0 release, which completes reimplementing rororo as library for implementing aiohttp.web OpenAPI 3 server applications with schema first approach.
rororo relies on valid OpenAPI 3 schema (both JSON & YAML formats supported).
Example below illustrates using openapi.yaml
schema file, stored next to
app
module,
from pathlib import Path
from typing import List
from aiohttp import web
from rororo import setup_openapi
from .views import operations
def create_app(argv: List[str] = None) -> web.Application:
return setup_openapi(
web.Application(),
Path(__file__).parent / "openapi.yaml",
operations,
)
Then, you need to register operation handlers in views
module. Example below shows registering handler for operationId hello_world
,
from aiohttp import web
from rororo import OperationTableDef
@operations.register
async def hello_world(request: web.Request) -> web.Response:
return web.json_response({"data": "Hello, world!"})
Documentation provides more information on implementing aiohttp.web OpenAPI 3 server applications with schema first approach using rororo.
Published by playpauseandstop over 4 years ago
OpenAPIRequest
, not as bytesflake8-variable-names
Published by github-actions[bot] over 4 years ago
schema
and spec
keyword args to setup_openapi
(#86)