Skip to main content
Latest version Travis-CI

aiohttp-utils provides handy utilities for building aiohttp.web applications.

  • Method-based handlers (“resources”)

  • Routing utilities

  • Content negotiation with JSON rendering by default

Everything is optional. You can use as much (or as little) of this toolkit as you need.

from aiohttp import web
from aiohttp_utils import Response, routing, negotiation

app = web.Application(router=routing.ResourceRouter())

# Method-based handlers
class HelloResource:

    async def get(self, request):
        name = request.GET.get('name', 'World')
        return Response({
            'message': 'Hello ' + name
        })


app.router.add_resource_object('/', HelloResource())

# Content negotiation
negotiation.setup(
    app, renderers={
        'application/json': negotiation.render_json
    }
)

Install

$ pip install aiohttp-utils

Documentation

Full documentation is available at https://aiohttp-utils.readthedocs.io/.

License

MIT licensed. See the bundled LICENSE file for more details.

Release files for aiohttp-utils 3.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiohttp-utils 3.2.1
File Size Uploaded
aiohttp-utils-3.2.1.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiohttp-utils 3.2.1
File Interpreter ABI Platform
aiohttp_utils-3.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 30.6 kB

Release files / aiohttp-utils-3.2.1.tar.gz

Download URL aiohttp-utils-3.2.1.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
50959c43af1a5ef830bc7ad62c1e8d805946a41e75561169487bcfb89ab5203c
BLAKE2b-256 checksum
How to use checksums
fc754b2fda5623ec032af5b8c603967eee3e437d3a257fff661ddfcf1d1facf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.2

Release files / aiohttp_utils-3.2.1-py2.py3-none-any.whl

Download URL aiohttp_utils-3.2.1-py2.py3-none-any.whl
Size 10.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2ea1d6e20c6c29062ba6bffbd8aa8cb852dbf0403499908c473f3932c0d7877b
BLAKE2b-256 checksum
How to use checksums
0669cdae27ac34ccb3d0616f963ab03159e2e59b21e62ae3d08bfc171f48683b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.2

Release history Release notifications | RSS feed

This release

3.2.1 This release

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page