# aiohttp_utils
**Repository Path**: mirrors_adamchainz/aiohttp_utils
## Basic Information
- **Project Name**: aiohttp_utils
- **Description**: Handy utilities for building aiohttp.web applications
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-24
- **Last Updated**: 2025-11-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
*************
aiohttp_utils
*************
.. image:: https://badge.fury.io/py/aiohttp_utils.png
:target: http://badge.fury.io/py/aiohttp_utils
:alt: Latest version
.. image:: https://travis-ci.org/sloria/aiohttp_utils.png
:target: https://travis-ci.org/sloria/aiohttp_utils
:alt: 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 this toolkit as you need.
.. code-block:: python
from aiohttp import web
from aiohttp_utils import Response, routing, negotiation, run
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
}
)
if __name__ == '__main__':
# Development server
run(
app,
app_uri='hello.app:app',
reload=True,
port=8000
)
Install
=======
::
$ pip install aiohttp_utils
Documentation
=============
Full documentation is available at https://aiohttp-utils.readthedocs.org/.
Project Links
=============
- Docs: http://aiohttp-utils.readthedocs.org/
- Changelog: http://aiohttp-utils.readthedocs.org/en/latest/changelog.html
- PyPI: https://pypi.python.org/pypi/aiohttp_utils
- Issues: https://github.com/sloria/aiohttp_utils/issues
License
=======
MIT licensed. See the bundled `LICENSE `_ file for more details.