xmlrpclib (version 1.0.1)
index
/home/garzogli/tmp/xmldb_client/src/python/xmlrpclib.py

An XML-RPC client interface for Python.
 
The marshalling and response parser code can also be used to
implement XML-RPC servers.
 
Exported exceptions:
 
  Error          Base class for client errors
  ProtocolError  Indicates an HTTP protocol error
  ResponseError  Indicates a broken response package
  Fault          Indicates an XML-RPC fault package
 
Exported classes:
 
  ServerProxy    Represents a logical connection to an XML-RPC server
 
  Boolean        boolean wrapper to generate a "boolean" XML-RPC value
  DateTime       dateTime wrapper for an ISO 8601 string or time tuple or
                 localtime integer value to generate a "dateTime.iso8601"
                 XML-RPC value
  Binary         binary data wrapper
 
  SlowParser     Slow but safe standard parser (based on xmllib)
  Marshaller     Generate an XML-RPC params chunk from a Python data structure
  Unmarshaller   Unmarshal an XML-RPC response from incoming XML event message
  Transport      Handles an HTTP transaction to an XML-RPC server
  SafeTransport  Handles an HTTPS transaction to an XML-RPC server
 
Exported constants:
 
  True
  False
 
Exported functions:
 
  boolean        Convert any Python value to an XML-RPC boolean
  getparser      Create instance of the fastest available parser & attach
                 to an unmarshalling object
  dumps          Convert an argument tuple or a Fault instance to an XML-RPC
                 request (or response, if the methodresponse option is used).
  loads          Convert an XML-RPC packet to unmarshalled data plus a method
                 name (None if not present).

 
Modules
            
xml.parsers.expat
operator
re
string
time

 
Classes
            
Binary
Boolean
DateTime
exceptions.Exception
Error
Fault
ProtocolError
ResponseError
ExpatParser
Marshaller
ServerProxy
SlowParser
Transport
SafeTransport
Unmarshaller
_Method

 
class Binary
      Wrapper for binary data.
 
  
__cmp__(self, other)
__init__(self, data=None)
__str__(self)
decode(self, data)
encode(self, out)

 
class Boolean
      Boolean-value wrapper.
 
Use True or False to generate a "boolean" XML-RPC value.
 
  
__cmp__(self, other)
__init__(self, value=0)
__int__(self)
__nonzero__(self)
__repr__(self)
encode(self, out)

 
class DateTime
      DateTime wrapper for an ISO 8601 string or time tuple or
localtime integer value to generate 'dateTime.iso8601' XML-RPC
value.
 
  
__cmp__(self, other)
__init__(self, value=0)
__repr__(self)
__str__(self)
decode(self, data)
encode(self, out)

 
class Error(exceptions.Exception)
      Base class for client errors.
 
  
__getitem__(...) from exceptions.Exception
__init__(...) from exceptions.Exception
__str__(self)

 
class ExpatParser
       
  
__init__(self, target)
# fast expat parser for Python 2.0 and later.  this is about
# 50% slower than sgmlop, on roundtrip testing
close(self)
feed(self, data)

 
class Fault(Error)
      Indicates an XML-RPC fault package.
 
  
__getitem__(...) from exceptions.Exception
__init__(self, faultCode, faultString, **extra)
__repr__(self)
__str__(self) from Error

 
class Marshaller
      Generate an XML-RPC params chunk from a Python data structure.
 
Create a Marshaller instance for each set of parameters, and use
the "dumps" method to convert your data (represented as a tuple)
to an XML-RPC params chunk.  To write a fault response, pass a
Fault instance instead.  You may prefer to use the "dumps" module
function for this purpose.
 
  
_Marshaller__dump = __dump(self, value, write)
__init__(self, encoding=None)
dump_array(self, value, write)
dump_double(self, value, write)
dump_instance(self, value, write)
dump_int(self, value, write)
dump_long(self, value, write)
dump_string(self, value, write, escape=<function escape>)
dump_struct(self, value, write, escape=<function escape>)
dump_unicode(self, value, write, escape=<function escape>)
dumps(self, values)

 
class ProtocolError(Error)
      Indicates an HTTP protocol error.
 
  
__getitem__(...) from exceptions.Exception
__init__(self, url, errcode, errmsg, headers)
__repr__(self)
__str__(self) from Error

 
class ResponseError(Error)
      Indicates a broken response package.
 
  
__getitem__(...) from exceptions.Exception
__init__(...) from exceptions.Exception
__str__(self) from Error

 
class SafeTransport(Transport)
      Handles an HTTPS transaction to an XML-RPC server.
 
  
_parse_response(self, file, sock) from Transport
getparser(self) from Transport
make_connection(self, host)
parse_response(self, file) from Transport
request(self, host, handler, request_body, verbose=0) from Transport
send_content(self, connection, request_body) from Transport
send_host(self, connection, host)
send_request(self, connection, handler, request_body) from Transport
send_user_agent(self, connection) from Transport

 
Server = class ServerProxy
      uri [,options] -> a logical connection to an XML-RPC server
 
uri is the connection point on the server, given as
scheme://host/target.
 
The standard implementation always supports the "http" scheme.  If
SSL socket support is available (Python 2.0), it also supports
"https".
 
If the target part and the slash preceding it are both omitted,
"/RPC2" is assumed.
 
The following options can be given as keyword arguments:
 
    transport: a transport factory
    encoding: the request encoding (default is UTF-8)
 
All 8-bit strings passed to the server proxy are assumed to use
the given encoding.
 
  
_ServerProxy__request = __request(self, methodname, params)
__getattr__(self, name)
__init__(self, uri, transport=None, encoding=None, verbose=0)
__repr__(self)
__str__ = __repr__(self)

 
class ServerProxy
      uri [,options] -> a logical connection to an XML-RPC server
 
uri is the connection point on the server, given as
scheme://host/target.
 
The standard implementation always supports the "http" scheme.  If
SSL socket support is available (Python 2.0), it also supports
"https".
 
If the target part and the slash preceding it are both omitted,
"/RPC2" is assumed.
 
The following options can be given as keyword arguments:
 
    transport: a transport factory
    encoding: the request encoding (default is UTF-8)
 
All 8-bit strings passed to the server proxy are assumed to use
the given encoding.
 
  
_ServerProxy__request = __request(self, methodname, params)
__getattr__(self, name)
__init__(self, uri, transport=None, encoding=None, verbose=0)
__repr__(self)
__str__ = __repr__(self)

 
class SlowParser
      Default XML parser (based on xmllib.XMLParser).
 
  
__init__(self, target)
# this is about 10 times slower than sgmlop, on roundtrip
# testing.

 
class Transport
      Handles an HTTP transaction to an XML-RPC server.
 
  
_parse_response(self, file, sock)
getparser(self)
make_connection(self, host)
parse_response(self, file)
request(self, host, handler, request_body, verbose=0)
send_content(self, connection, request_body)
send_host(self, connection, host)
send_request(self, connection, handler, request_body)
send_user_agent(self, connection)

 
class Unmarshaller
      Unmarshal an XML-RPC response, based on incoming XML event
messages (start, data, end).  Call close() to get the resulting
data structure.
 
Note that this reader is fairly tolerant, and gladly accepts bogus
XML-RPC data without complaining (but not bogus XML).
 
  
__init__(self)
close(self)
data(self, text)
end(self, tag, join=<function join>)
end_array(self, data)
end_base64(self, data)
end_boolean(self, data)
end_dateTime(self, data)
end_dispatch(self, tag, data)
end_double(self, data)
end_fault(self, data)
end_int(self, data)
end_methodName(self, data)
end_params(self, data)
end_string(self, data)
end_struct(self, data)
end_value(self, data)
getmethodname(self)
start(self, tag, attrs)
xml(self, encoding, standalone)

 
class _Method
       
  
__call__(self, *args)
__getattr__(self, name)
__init__(self, send, name)
# some magic to bind an XML-RPC method to an RPC server.
# supports "nested" methods (e.g. examples.getStateName)

 
Functions
            
_binary(data)
_datetime(data)
_decode(data, encoding, is8bit=<built-in method search of SRE_Pattern object>)
_stringify(string)
boolean(value, _truefalse=(<Boolean False at 818337c>, <Boolean True at 81832cc>))
Convert any Python value to XML-RPC 'boolean'.
dumps(params, methodname=None, methodresponse=None, encoding=None)
data [,options] -> marshalled data
 
Convert an argument tuple or a Fault instance to an XML-RPC
request (or response, if the methodresponse option is used).
 
In addition to the data object, the following options can be given
as keyword arguments:
 
    methodname: the method name for a methodCall packet
 
    methodresponse: true to create a methodResponse packet.
    If this option is used with a tuple, the tuple must be
    a singleton (i.e. it can contain only one element).
 
    encoding: the packet encoding (default is UTF-8)
 
All 8-bit strings in the data structure are assumed to use the
packet encoding.  Unicode strings are automatically converted,
where necessary.
escape(s, replace=<function replace>)
getparser()
getparser() -> parser, unmarshaller
 
Create an instance of the fastest available parser, and attach it
to an unmarshalling object.  Return both objects.
loads(data)
data -> unmarshalled data, method name
 
Convert an XML-RPC packet to unmarshalled data plus a method
name (None if not present).
 
If the XML-RPC packet represents a fault condition, this function
raises a Fault exception.

 
Data
             APPLICATION_ERROR = -32500
BufferType = <type 'buffer'>
BuiltinFunctionType = <type 'builtin_function_or_method'>
BuiltinMethodType = <type 'builtin_function_or_method'>
ClassType = <type 'class'>
CodeType = <type 'code'>
ComplexType = <type 'complex'>
DictType = <type 'dictionary'>
DictionaryType = <type 'dictionary'>
EllipsisType = <type 'ellipsis'>
False = <Boolean False at 818337c>
FastMarshaller = None
FastParser = None
FastUnmarshaller = None
FileType = <type 'file'>
FloatType = <type 'float'>
FrameType = <type 'frame'>
FunctionType = <type 'function'>
INTERNAL_ERROR = -32603
INVALID_ENCODING_CHAR = -32702
INVALID_METHOD_PARAMS = -32602
INVALID_XMLRPC = -32600
InstanceType = <type 'instance'>
IntType = <type 'int'>
LambdaType = <type 'function'>
ListType = <type 'list'>
LongType = <type 'long int'>
MAXINT = 2147483647L
METHOD_NOT_FOUND = -32601
MININT = -2147483648L
MethodType = <type 'instance method'>
ModuleType = <type 'module'>
NOT_WELLFORMED_ERROR = -32700
NoneType = <type 'None'>
PARSE_ERROR = -32700
SERVER_ERROR = -32600
SYSTEM_ERROR = -32400
SgmlopParser = None
SliceType = <type 'slice'>
StringType = <type 'string'>
TRANSPORT_ERROR = -32300
TracebackType = <type 'traceback'>
True = <Boolean True at 81832cc>
TupleType = <type 'tuple'>
TypeType = <type 'type'>
UNSUPPORTED_ENCODING = -32701
UnboundMethodType = <type 'instance method'>
UnicodeType = <type 'unicode'>
WRAPPERS = (<class xmlrpclib.DateTime>, <class xmlrpclib.Binary>, <class xmlrpclib.Boolean>)
XRangeType = <type 'xrange'>
__file__ = './xmlrpclib.pyc'
__name__ = 'xmlrpclib'
__version__ = '1.0.1'