Prerequisites
RPC4Django has been tested on Mac OS, Linux and Windows.
Installation
pip install rpc4django[reST]
Configuration
First, you need to add new url pattern to your root urls.py file. You can replace r'^RPC2$' with anything you like.
# urls.py from rpc4django.views import serve_rpc_request urlpatterns = ( # rpc4django will need to be in your Python path url(r'^RPC2$', serve_rpc_request), )Second, add RPC4Django to the list of installed applications in your settings.py.
# settings.py INSTALLED_APPS = ( 'rpc4django', )Lastly, you need to let RPC4Django know which methods to make available. RPC4Django recursively imports all the apps in INSTALLED_APPS and makes any methods importable via __init__.py with the @rpcmethod decorator available as RPC methods. You can always write your RPC methods in another module and simply import it in __init__.py.
# testapp/__init__.py from rpc4django import rpcmethod # The doc string supports reST if docutils is installed @rpcmethod(name='mynamespace.add', signature=['int', 'int', 'int']) def add(a, b): '''Adds two numbers together >>> add(1, 2) 3 ''' return a+b
Metadata
Release files for rpc4django 0.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rpc4django-0.6.3.tar.gz | 25.8 kB | Without provenance | Details for rpc4django-0.6.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rpc4django-0.6.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for rpc4django-0.6.3-py2.py3-none-any.whl |
Total release size: 44.6 kB
Release files / rpc4django-0.6.3.tar.gz
| Download URL | rpc4django-0.6.3.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
194a368d9d889dc357ef345b87eced95c5a43b2e528b23fc339f12318962b4d2
|
|
BLAKE2b-256 checksum How to use checksums |
97a95d280daac42d119ccbc8f3f963d0d8b9ab1bd5eef6d068c403fccf932c73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.5
|
Release files / rpc4django-0.6.3-py2.py3-none-any.whl
| Download URL | rpc4django-0.6.3-py2.py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
905b0719b6a80b1fedee867588a893746d1da52bc1199dd4df7f7ed1bd886098
|
|
BLAKE2b-256 checksum How to use checksums |
e3dbb9fd8da7f63bc42d6e5e1f734825d606936766e3df16420577b67a1b8ddc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.5
|
Security for rpc4django 0.6.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.