1
0
Fork 0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-aiohttp
Tomek Wójcik d8caea5c34 v1.1.0 2024-01-15 21:44:16 +01:00
..
bthlabs_jsonrpc_aiohttp v1.1.0 2024-01-15 21:44:16 +01:00
docs v1.1.0 2024-01-15 21:44:16 +01:00
example v1.1.0b1 2024-01-15 20:20:10 +00:00
skel Initial public releases 2022-06-04 10:41:53 +02:00
tests v1.1.0b1 2024-01-15 20:20:10 +00:00
LICENSE Initial public releases 2022-06-04 10:41:53 +02:00
README.rst Initial public releases 2022-06-04 10:41:53 +02:00
poetry.lock v1.1.0 2024-01-15 21:44:16 +01:00
poetry.toml Initial public releases 2022-06-04 10:41:53 +02:00
pyproject.toml v1.1.0 2024-01-15 21:44:16 +01:00
setup.cfg v1.1.0b1 2024-01-15 20:20:10 +00:00

README.rst

bthlabs-jsonrpc-aiohttp
=======================

BTHLabs JSONRPC - aiohttp integration

`Docs`_ | `Source repository`_

Overview
--------

BTHLabs JSONRPC is a set of Python libraries that provide extensible framework
for adding JSONRPC interfaces to existing Python Web applications.

The *aiohttp* package provides aiohttp integration.

Installation
------------

.. code-block:: shell

    $ pip install bthlabs_jsonrpc_aiohttp

Example
-------

.. code-block:: python

    # app.py
    from aiohttp import web
    from bthlabs_jsonrpc_core import register_method

    from bthlabs_jsonrpc_aiohttp import JSONRPCView

    @register_method('hello')
    async def hello(request, who='World'):
        return f'Hello, {who}!'

    app = web.Application()
    app.add_routes([
        web.post('/rpc', JSONRPCView()),
    ])

Author
------

*bthlabs-jsonrpc-aiohttp* is developed by `Tomek Wójcik`_.

License
-------

*bthlabs-jsonrpc-aiohttp* is licensed under the MIT License.

.. _Docs: https://projects.bthlabs.pl/bthlabs-jsonrpc/aiohttp/
.. _Source repository: https://git.bthlabs.pl/tomekwojcik/bthlabs-jsonrpc/
.. _Tomek Wójcik: https://www.bthlabs.pl/