Skip to main content

Handy utilities for aiohttp.web applications.

Project description

Latest version Travis-CI

aiohttp_utils provides handy utilities for building aiohttp.web applications.

  • Method-based handlers (“resources”)
  • Content negotiation with JSON rendering by default
  • Local development server with auto-reloading
  • And more

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

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

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('/', HelloResource())

# Content negotiation
negotiation.setup(app, {
    'RENDERERS': {
        'application/json': negotiation.render_json

if __name__ == '__main__':
    # Development server


$ pip install aiohttp_utils


Full documentation is available at


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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aiohttp-utils, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size aiohttp_utils-0.1.0-py2.py3-none-any.whl (13.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size aiohttp_utils-0.1.0.tar.gz (18.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page