connection Package

connection Module


Return connector specified by it’s name


Returns list of connector names registered in system

class odoo_rpc_client.connection.connection.ConnectorBase(host, port, timeout=None, extra_args=None)[source]

Bases: object

Base class for all connectors

  • host (str) – hostname to connect to
  • port (int) – port to connect to
  • extra_args (dict) – extra arguments for specific connector.

Connector extra arguments


Returns service for specified name

Parameters:name – name of service
Returns:specified service instance

Connector host


Connector port


Connector timeout


Update extra args and clean service cache

jsonrpc Module

class odoo_rpc_client.connection.jsonrpc.ConnectorJSONRPC(*args, **kwargs)[source]

Bases: odoo_rpc_client.connection.connection.ConnectorBase

JSON-RPC connector

available extra arguments:
  • ssl_verify: (optional) if True, the SSL cert will be verified.
class Meta[source]

Bases: object

name = 'json-rpc'
use_ssl = False
class odoo_rpc_client.connection.jsonrpc.ConnectorJSONRPCS(*args, **kwargs)[source]

Bases: odoo_rpc_client.connection.jsonrpc.ConnectorJSONRPC

JSON-RPCS Connector

class Meta[source]

Bases: object

name = 'json-rpcs'
use_ssl = True
exception odoo_rpc_client.connection.jsonrpc.JSONRPCError(message, code=None, data=None)[source]

Bases: odoo_rpc_client.exceptions.ConnectorError

JSON-RPC error wrapper


Debug information got from Odoo server

Usualy traceback


Error message got from Odoo server

class odoo_rpc_client.connection.jsonrpc.JSONRPCMethod(rpc_proxy, url, service, method)[source]

Bases: object

Class that implements RPC call via json-rpc protocol


Prepare data for JSON request

class odoo_rpc_client.connection.jsonrpc.JSONRPCProxy(host, port, service, ssl=False, ssl_verify=True, timeout=None)[source]

Bases: object

Simple Odoo service proxy wrapper

xmlrpc Module

class odoo_rpc_client.connection.xmlrpc.ConnectorXMLRPC(host, port, timeout=None, extra_args=None)[source]

Bases: odoo_rpc_client.connection.connection.ConnectorBase

XML-RPC connector

Note: extra_arguments may be same as parametrs of xmlrpclib.ServerProxy

class Meta[source]

Bases: object

name = 'xml-rpc'
ssl = False
class odoo_rpc_client.connection.xmlrpc.ConnectorXMLRPCS(host, port, timeout=None, extra_args=None)[source]

Bases: odoo_rpc_client.connection.xmlrpc.ConnectorXMLRPC

XML-RPCS Connector

Note: extra_arguments may be same as parametrs of xmlrpclib.ServerProxy

class Meta[source]

Bases: object

name = 'xml-rpcs'
ssl = True
exception odoo_rpc_client.connection.xmlrpc.XMLRPCError(fault_instance)[source]

Bases: odoo_rpc_client.exceptions.ConnectorError

Exception raised on XMLRpc errors

Parameters:fault_instance (xmlrpclib.Fault) – exception raised by XMLRPC lib

Return xmlrpclib.Fault instance related to this error

class odoo_rpc_client.connection.xmlrpc.XMLRPCMethod(method)[source]

Bases: object

Class wrapper around XML-RPC method to wrap xmlrpclib.Fault into XMLRPCProxy

class odoo_rpc_client.connection.xmlrpc.XMLRPCProxy(uri, timeout=None, *args, **kwargs)[source]

Bases: xmlrpc.client.ServerProxy

Wrapper class around XML-RPC’s ServerProxy to wrap method’s errors into XMLRPCError class