| Trees | Index | Help |
|
|---|
| Module xmlrpclib |
|
An XML-RPC client interface for Python.
############################################################
patched for use with co2 to use socket.settimeout by default
modifications are marked '# co2 patch'
############################################################
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).
| Classes | |
|---|---|
Binary |
Wrapper for binary data. |
DateTime |
DateTime wrapper for an ISO 8601 string or time tuple or localtime integer value to generate 'dateTime.iso8601' XML-RPC value. |
ExpatParser |
|
Marshaller |
Generate an XML-RPC params chunk from a Python data structure. |
SafeTransport |
Handles an HTTPS transaction to an XML-RPC server. |
Server |
uri [,options] -> a logical connection to an XML-RPC server |
ServerProxy |
uri [,options] -> a logical connection to an XML-RPC server |
SlowParser |
Default XML parser (based on xmllib.XMLParser). |
Transport |
Handles an HTTP transaction to an XML-RPC server. |
Unmarshaller |
Unmarshal an XML-RPC response, based on incoming XML event messages (start, data, end). |
| Exceptions | |
|---|---|
Error |
Base class for client errors. |
Fault |
Indicates an XML-RPC fault package. |
ProtocolError |
Indicates an HTTP protocol error. |
ResponseError |
Indicates a broken response package. |
| Function Summary | |
|---|---|
data [,options] -> marshalled data | |
escape(s,
replace)
| |
getparser() -> parser, unmarshaller | |
data -> unmarshalled data, method name | |
| Variable Summary | |
|---|---|
str |
__version__
|
int |
APPLICATION_ERROR
|
bool |
False
|
NoneType |
FastMarshaller
|
NoneType |
FastParser
|
NoneType |
FastUnmarshaller
|
int |
INTERNAL_ERROR
|
int |
INVALID_ENCODING_CHAR
|
int |
INVALID_METHOD_PARAMS
|
int |
INVALID_XMLRPC
|
long |
MAXINT
|
int |
METHOD_NOT_FOUND
|
long |
MININT
|
int |
NOT_WELLFORMED_ERROR
|
int |
PARSE_ERROR
|
int |
SERVER_ERROR
|
NoneType |
SgmlopParser
|
float |
SOCKET_TIMEOUT
|
tuple |
StringTypes
|
int |
SYSTEM_ERROR
|
int |
TRANSPORT_ERROR
|
bool |
True
|
int |
UNSUPPORTED_ENCODING
|
tuple |
WRAPPERS
|
| Function Details |
|---|
dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=0)
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.
|
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. |
| Variable Details |
|---|
__version__
|
APPLICATION_ERROR
|
False
|
FastMarshaller
|
FastParser
|
FastUnmarshaller
|
INTERNAL_ERROR
|
INVALID_ENCODING_CHAR
|
INVALID_METHOD_PARAMS
|
INVALID_XMLRPC
|
MAXINT
|
METHOD_NOT_FOUND
|
MININT
|
NOT_WELLFORMED_ERROR
|
PARSE_ERROR
|
SERVER_ERROR
|
SgmlopParser
|
SOCKET_TIMEOUT
|
StringTypes
|
SYSTEM_ERROR
|
TRANSPORT_ERROR
|
True
|
UNSUPPORTED_ENCODING
|
WRAPPERS
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 1.1 on Thu Oct 16 16:37:23 2003 | http://epydoc.sf.net |