The Metasploit's msgrpc module utilized MessagePack, a binary serialized version of JSON, as a format and only requirement to use this feature is to load msgrpc module:
msfconsole -x "load msgrpc ServerHost=127.0.0.1 ServerPort=55552 User=msf Pass='abc123'"
Trustwave's SpiderLabs built "msfrpc" to handle RPC authentication and message authorization as a module for Ruby and Python, but isn't getting any update since 2012.
The is a forked version intended to support Python 3.x with fixes and updates on calling logic. You can also find examples code in main function. Please let me know if you are in trouble with this project.
Full API documentation available here.