Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

django-modern-rpc

Tests Documentation Status Downloads Link to demo

Embed an XML-RPC and/or JSON-RPC server in your Django project!

Main features

  • XML-RPC and JSON-RPC 2.0 support (JSON-RPC 1.0 is NOT supported)
  • Custom authentication
  • Error handling
  • Sync and async procedures
  • Multiple entry-points

Requirements

The following Django / Python versions are supported, according to Django Installation FAQ

Python ➞ 3.8 3.9 3.10 3.11 3.12 3.13 3.14
Django 3.2 🟢 🟢 🟢 🔴 🔴 🔴 🔴
Django 4.0 🟢 🟢 🟢 🔴 🔴 🔴 🔴
Django 4.1 🟢 🟢 🟢 🟢 🔴 🔴 🔴
Django 4.2 🟢 🟢 🟢 🟢 🟢 🔴 🔴
Django 5.0 🔴 🔴 🟢 🟢 🟢 🔴 🔴
Django 5.1 🔴 🔴 🟢 🟢 🟢 🟢 🔴
Django 5.2 🔴 🔴 🟢 🟢 🟢 🟢 🟢
Django 6.0 🔴 🔴 🔴 🔴 🟢 🟢 🟢

To enforce security, defusedxml will be installed as a dependency.

Quickstart

Install django-modern-rpc in your environment

pip install django-modern-rpc

Create an RpcServer instance and register your first procedure, in myapp/rpc.py

from modernrpc.server import RpcServer

server = RpcServer()


@server.register_procedure
def add(a: int, b: int) -> int:
    """Add two numbers and return the result.

    :param a: First number
    :param b: Second number
    :return: Sum of a and b
    """
    return a + b

Configure a path to allow RPC clients calling your procedures, in urls.py

from django.urls import path
from myapp.rpc import server

urlpatterns = [
    # ... other url patterns
    path('rpc/', server.view),  # Synchronous view
]

The server's view is already configured with CSRF exemption and POST-only restrictions.

Code quality

The project uses nox as a task runner to launch tests suite against all supported Python / Django combinations and generate a coverage report file. Ruff is used to lint and format the codebase, and mypy is used to perform type checking.

All these tools are automatically run in various GitHub Actions workflows, and external tools are used to perform static code analysis and collect coverage results.

SonarQube

Sonar Coverage Sonar Quality Gate Sonar Tech Debt Sonar Violations

Codacy

Codacy Coverage Codacy Grade

Coveralls

Coveralls

Download files

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

Source Distribution

django_modern_rpc-2.0b1.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

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

django_modern_rpc-2.0b1-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file django_modern_rpc-2.0b1.tar.gz.

File metadata

  • Download URL: django_modern_rpc-2.0b1.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for django_modern_rpc-2.0b1.tar.gz
Algorithm Hash digest
SHA256 92ba1db0c372440a21d5dda7486464e671f96164dff1b16b2983931fec626a98
MD5 d2e43829c7fa67eda44fcf3f3e378374
BLAKE2b-256 578bac470dc96610eaef5fe2c2d63024935a08f72975faba7f505957fd5a1472

See more details on using hashes here.

File details

Details for the file django_modern_rpc-2.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_modern_rpc-2.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ba050d7e18a6ca31e5b0f74b6410d049f35a8dc12e620ef15eaeedf59c51db5
MD5 04ce2fe1c8adde9bb4dc9d1672110140
BLAKE2b-256 8342e6347c68ce1977032a019dcaaf0b7c0a96a116a460966b52590ebb44755b

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.0

2 files

2.0.0

2 files

This release

2.0b1 This release

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

1.0.0a4

2 files

1.0.0a3

2 files

1.0.0a2

2 files

1.0.0a1

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

3 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page