Skip to main content

Simple and modern JSON-RPC and XML-RPC server implementation for Django

Project description


django-modern-rpc is a free, lightweight RPC server for Django projects. The project is still under development, and its API is subject to modifications. Currently supported features are:

  • XML-RPC (as described on and JSON-RPC 2.0 (from support. Please note that JSON-RPC 1.0 is not supported.
  • Automatic protocol detection based on the request’s header Content-Type
  • Python 2.7, 3.3, 3.4 and 3.5
  • Django 1.8, 1.9 and 1.10
  • Usual error handled and reported to callers
  • Multi entry points, with specific methods and protocol attached
  • System introspection methods:

Features not yet implemented

  • Multi-call for JSON-RPC
  • Built-in support for request authentications

Quick start

  1. Install the library using pip:

    pip install django-modern-rpc
  2. Add it to your Django applications, in

  1. Declare an entry point, a view which will generate a correct RPC response depending on the incoming request:
# In myproject/rpc_app/
from django.conf.urls import url

from modernrpc.views import RPCEntryPoint

urlpatterns = [
    url(r'^rpc/', RPCEntryPoint.as_view()),
  1. Decorate the methods you want to make available via RPC calls:
# In myproject/rpc_app/
from modernrpc.core import rpc_method

def add(a, b):
    return a + b
  1. Declare the list of python modules containing your RPC methods, in

Now, you can call the RPC method add from a client:

>>> from xmlrpc.client import ServerProxy
>>> client = ServerProxy('')
>>> print(client.add(2, 3))

To get more information, please read the full documentation.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django_modern_rpc-0.4.0-py2.py3-none-any.whl (22.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
django-modern-rpc-0.4.0.tar.gz (17.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page