
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
JSON REST framework based on aiohttp (an asyncio (PEP 3156) http server).
.. image:: https://travis-ci.org/aio-libs/aiorest.svg?branch=master :target: https://travis-ci.org/aio-libs/aiorest
The project always was in experimental status: we have tried to make the proof
of concept for aiohttp
high level server.
Now the work is done, the most important parts transplanted to
aiohttp.web
: Request
and Response
.
Some aiorest
features are not supported by aiohttp.web
yet:
sessions, CORS and security.
We are working hard on the issue by making aiohttp
extension
libraries for those ones.
We will keep aiorest work on top of aiohttp new versions for a while.
Please report about incompatibility bugs to aiorest github issue tracker -- we'll fix those.
Simple REST server can be run like this::
import asyncio import aiohttp import aiorest
def hello(request): return {'hello': 'world'}
loop = asyncio.get_event_loop() server = aiorest.RESTServer(hostname='127.0.0.1', loop=loop)
server.add_url('GET', '/hello', hello)
srv = loop.run_until_complete(loop.create_server( server.make_handler, '127.0.0.1', 8080))
@asyncio.coroutine def query(): resp = yield from aiohttp.request( 'GET', 'http://127.0.0.1:8080/hello', loop=loop) data = yield from resp.read_and_close(decode=True) print(data)
loop.run_until_complete(query()) srv.close() loop.run_until_complete(srv.wait_closed()) loop.close()
this will print {'hello': 'world'}
json
See examples <https://github.com/aio-libs/aiorest/tree/master/examples>
_ for more.
Python 3.3
asyncio http://code.google.com/p/tulip/ or Python 3.4+
optional module aiorest.redis_session
requires aioredis
https://github.com/aio-libs/aioredis
aiorest is offered under the MIT license.
0.4.0 (2015-01-18) ^^^^^^^^^^^^^^^^^^
The aiorest library development has stopped, use aiohttp.web instead.
Update aiorest code to be compatible with aiohttp 0.14 release.
0.3.1 (2014-12-22) ^^^^^^^^^^^^^^^^^^
0.3.0 (2014-12-17) ^^^^^^^^^^^^^^^^^^
0.2.5 (2014-10-30) ^^^^^^^^^^^^^^^^^^
0.2.4 (2014-09-12) ^^^^^^^^^^^^^^^^^^
0.2.3 (2014-08-28) ^^^^^^^^^^^^^^^^^^
0.2.2 (2014-08-15) ^^^^^^^^^^^^^^^^^^
Added Pyramid-like matchdict to request (see https://github.com/aio-libs/aiorest/pull/18)
Return "400 Bad Request" for incorrect JSON body in POST/PUT methods
README fixed
Custom response status code (see https://github.com/aio-libs/aiorest/pull/23)
0.1.1 (2014-07-09) ^^^^^^^^^^^^^^^^^^
0.1.0 (2014-07-07) ^^^^^^^^^^^^^^^^^^
FAQs
Support REST calls for asyncio+aiohttp.
We found that aiorest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.