1
0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-django
2024-01-15 20:20:10 +00:00
..
bthlabs_jsonrpc_django v1.1.0b1 2024-01-15 20:20:10 +00:00
docs v1.1.0b1 2024-01-15 20:20:10 +00: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
testing v1.1.0b1 2024-01-15 20:20:10 +00: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
poetry.lock v1.1.0b1 2024-01-15 20:20:10 +00:00
poetry.toml Initial public releases 2022-06-04 10:41:53 +02:00
pyproject.toml v1.1.0b1 2024-01-15 20:20:10 +00:00
README.rst Initial public releases 2022-06-04 10:41:53 +02:00
setup.cfg v1.1.0b1 2024-01-15 20:20:10 +00: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/