1
0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-django
Tomek Wójcik c75ea4ea9d Initial public releases
* `bthlabs-jsonrpc-aiohttp` v1.0.0
* `bthlabs-jsonrpc-core` v1.0.0
* `bthlabs-jsonrpc-django` v1.0.0
2022-06-04 10:41:53 +02:00
..
bthlabs_jsonrpc_django Initial public releases 2022-06-04 10:41:53 +02:00
docs Initial public releases 2022-06-04 10:41:53 +02:00
example Initial public releases 2022-06-04 10:41:53 +02:00
skel Initial public releases 2022-06-04 10:41:53 +02:00
testing Initial public releases 2022-06-04 10:41:53 +02:00
tests Initial public releases 2022-06-04 10:41:53 +02:00
LICENSE Initial public releases 2022-06-04 10:41:53 +02:00
poetry.lock Initial public releases 2022-06-04 10:41:53 +02:00
poetry.toml Initial public releases 2022-06-04 10:41:53 +02:00
pyproject.toml Initial public releases 2022-06-04 10:41:53 +02:00
README.rst Initial public releases 2022-06-04 10:41:53 +02:00
setup.cfg Initial public releases 2022-06-04 10:41:53 +02:00

bthlabs-jsonrpc-django
======================

BTHLabs JSONRPC - django 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 *django* package provides Django integration.

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

.. code-block:: shell

    $ pip install bthlabs_jsonrpc_django

Example
-------

.. code-block:: python

    # settings.py
    INSTALLED_APPS = [
        # ...
        'bthlabs_jsonrpc_django',
    ]

.. code-block:: python

    # settings.py
    JSONRPC_METHOD_MODULES = [
        # ...
        'your_app.rpc_methods',
    ]

.. code-block:: python

    # urls.py
    urlpatterns = [
        # ...
        path('rpc', JSONRPCView.as_view()),
    ]

.. code-block:: python

    # your_app/rpc_methods.py
    from bthlabs_jsonrpc_core import register_method

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

Author
------

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

License
-------

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

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