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.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bthlabs_jsonrpc_django-1.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file bthlabs_jsonrpc_django-1.2.0.tar.gz.

File metadata

  • Download URL: bthlabs_jsonrpc_django-1.2.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for bthlabs_jsonrpc_django-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a384d9a7f6ca151dfbf3fda828413a3c823551fc09b7e8a1bdc3aa3a208cf8f8
MD5 32b4c21ff631111aa20c48527884d60d
BLAKE2b-256 d1311658fa34b3c114494d7ba0f8ff880bdddd95f64acfc218b5e6a34ee1678d

See more details on using hashes here.

File details

Details for the file bthlabs_jsonrpc_django-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bthlabs_jsonrpc_django-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a19c65bbc534de2cd1b98a7651ac25aad83e5e7d91381f8f0df3cf734351617e
MD5 f3e6b7604399d322c47e62fcfca3acbe
BLAKE2b-256 cf38d4c789e64c759a660e6791834bb7a620fb67d700a922b2645a8a544af997

See more details on using hashes here.

Supported by

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