Skip to main content

BTHLabs JSONRPC - Django integration

Project description

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

$ pip install bthlabs_jsonrpc_django

Example

# settings.py
INSTALLED_APPS = [
    # ...
    'bthlabs_jsonrpc_django',
]
# settings.py
JSONRPC_METHOD_MODULES = [
    # ...
    'your_app.rpc_methods',
]
# urls.py
urlpatterns = [
    # ...
    path('rpc', JSONRPCView.as_view()),
]
# 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bthlabs-jsonrpc-django-1.0.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

bthlabs_jsonrpc_django-1.0.0-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page