You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new API, heavily inspired from tools like FastAPI or django-ninja, encapsulate the procedures registration in a
dedicated RpcServer instance. This removes the need to lookup modules based on settings.MODERNRPC_METHODS_MODULES
value, so modernrpc does not need to be added to settings.INSTALLED_APPS anymore.
RpcNamespace were added to provide a better organization of procedures. Each one can be registered in a
previously defined RpcServer.
It is now possible to register async procedures. Both sync (legacy) and async procedures are served by the default
view (synchronous)
For improved performances with async procedures, an async view has been added and can be used as a replacement to
expose procedures. The async_view can serve both sync and async procedures.
Error handling has been improved, allowing executing a callback function when an exception is caught and before an
RPC error response is built.
The authentication process has been improved. Multiple callbacks can be configured at server-level, namespace-level
or directly on a specific remote procedure.
It is now possible to configure different backends to deserialize XML-RPC and JSON-RPC requests and to serialize
XML-RPC and JSON-RPC responses. Alternative backends may provide more features, configuration options, specific types
support or better performances.
Breaking Changes
Complete architecture redesign: The library now uses a server-based approach instead of entry points
Removed the RPCEntryPoint class-based view in favor of the new function based views provided by RpcServer class
Removed automatic procedure registration via MODERNRPC_METHODS_MODULES setting
Removed HTML documentation generation through entry points
Changed the way procedures access request context, now using the context_target parameter
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Improvements
dedicated
RpcServerinstance. This removes the need to lookup modules based onsettings.MODERNRPC_METHODS_MODULESvalue, so
modernrpcdoes not need to be added to settings.INSTALLED_APPS anymore.RpcNamespacewere added to provide a better organization of procedures. Each one can be registered in apreviously defined
RpcServer.asyncprocedures. Both sync (legacy) and async procedures are served by the defaultview (synchronous)
asyncprocedures, anasyncview has been added and can be used as a replacement toexpose procedures. The
async_viewcan serve both sync and async procedures.RPC error response is built.
or directly on a specific remote procedure.
XML-RPC and JSON-RPC responses. Alternative backends may provide more features, configuration options, specific types
support or better performances.
Breaking Changes
RPCEntryPointclass-based view in favor of the new function based views provided byRpcServerclassMODERNRPC_METHODS_MODULESsettingcontext_targetparameterMisc
This discussion was created from the release v2.0.0 (2025-11-10).
Beta Was this translation helpful? Give feedback.
All reactions