connection Package

connection Module


Return connector specified by it’s name


Returns list of connector names registered in system

class openerp_proxy.connection.connection.ConnectorBase(host, port, 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


Update extra args and clean service cache

jsonrpc Module

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

Bases: openerp_proxy.connection.connection.ConnectorBase

JSON-RPC connector

available extra arguments:
  • ssl_verify: (optional) if True, the SSL cert will be verified.
class Meta[source]
name = 'json-rpc'
use_ssl = False
class openerp_proxy.connection.jsonrpc.ConnectorJSONRPCS(*args, **kwargs)[source]

Bases: openerp_proxy.connection.jsonrpc.ConnectorJSONRPC

JSON-RPCS Connector

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

Bases: openerp_proxy.exceptions.ConnectorError

JSON-RPC error wrapper


Debug information got from Odoo server

Usualy traceback


Error message got from Odoo server

class openerp_proxy.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 openerp_proxy.connection.jsonrpc.JSONRPCProxy(host, port, service, ssl=False, ssl_verify=True)[source]

Bases: object

Simple Odoo service proxy wrapper

xmlrpc Module

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

Bases: openerp_proxy.connection.connection.ConnectorBase

XML-RPC connector

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

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

Bases: openerp_proxy.connection.xmlrpc.ConnectorXMLRPC

XML-RPCS Connector

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

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

Bases: openerp_proxy.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 openerp_proxy.connection.xmlrpc.XMLRPCMethod(method)[source]

Bases: object

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

class openerp_proxy.connection.xmlrpc.XMLRPCProxy(uri, transport=None, encoding=None, verbose=0, allow_none=0, use_datetime=0, context=None)[source]

Bases: xmlrpclib.ServerProxy

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