Django-modern-rpc demo

Introduction

Django-modern-rpc is a Django library that help you to enable a JSON and XML-RPC server in your application. It is easy to install and configure, and highly customizable. This website show the library in action. The current running version is 1.1.0.

Library in action

You can try the library right now. Simply make RPC calls using your preferred client to the address https://modernrpc.onrender.com/rpc

Simply raises a custom exception

No documentation on return types available yet

Return an instance of python builtin Fraction class, which cannot be serialized

No documentation on return types available yet

Add termA and termB, end return the result

Parameters:
  • termA (int, float) - First term
  • termB (int, float) - Second term
Returns:
  • int, float - Sum of the two terms

Divide the dividend by the divisor

Parameters:
  • dividend Number
  • divisor Number
Returns:
  • Result of the division

Returns a list of all methods available in the current entry point

Parameters:
  • kwargs
No documentation on return types available yet

Returns the documentation of the given method name.

Parameters:
  • method_name Name of a method available for current entry point (and protocol)
  • kwargs
Returns:
  • Documentation text for the RPC method

Returns an array describing the signature of the given method name.

The result is an array with: - Return type as first elements - Types of method arguments from element 1 to N

Parameters:
  • method_name Name of a method available for current entry point (and protocol)
  • kwargs
Returns:
  • An array of arrays describing types of return values and method arguments

Call multiple RPC methods at once.

Parameters:
  • calls An array of struct like {"methodName": string, "params": array }
  • kwargs Internal data
No documentation on return types available yet

Inspect request to extract the Content-Type heaser if present. This method demonstrate how a RPC method can access the request object.

Parameters:
  • kwargs Dict with current request, protocol and entry_point information.
Returns:
  • The Content-Type string for incoming request

Note: you can also get this list of all method on dedicated page .

About this website

The source code of this website is available on GitHub.

About django-modern-rpc

Source code Full documentation Library on PyPi

If you use this library in your project and want to help increasing its visibility, just go to djangopackages and vote for the library. Thank you !