Trees Indices Help
Python Standard Library
Module xmlrpclib
[]

Module xmlrpclib

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
 MultiCall Executor of boxcared xmlrpc requests
 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).

Version: 1.0.1

Classes [hide private]
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. DateTime
DateTime wrapper for an ISO 8601 string or time tuple or localtime integer value to generate 'dateTime.iso8601' XML-RPC value. Binary
Wrapper for binary data. ExpatParser SlowParser
Default XML parser (based on xmllib.XMLParser). Marshaller
Generate an XML-RPC params chunk from a Python data structure. Unmarshaller
Unmarshal an XML-RPC response, based on incoming XML event messages (start, data, end). _MultiCallMethod MultiCallIterator
Iterates over the results of a multicall. MultiCall
server -> a object used to boxcar method calls _Method Transport
Handles an HTTP transaction to an XML-RPC server. SafeTransport
Handles an HTTPS transaction to an XML-RPC server. ServerProxy
uri [,options] -> a logical connection to an XML-RPC server Server
uri [,options] -> a logical connection to an XML-RPC server
Functions [hide private]
_decode(data, encoding, is8bit=<built-in method search of _sre.SRE_Pattern object at 0x406b83a0>)
escape(s, replace=<function replace at 0x404dc224>)
_stringify(string)
_datetime(data)
_datetime_type(data)
_binary(data)
parser, unmarshaller
getparser()
Create an instance of the fastest available parser, and attach it to an unmarshalling object.
dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=0)
data [,options] -> marshalled data
loads(data, use_datetime=0)
data -> unmarshalled data, method name
Variables [hide private]
unicode = None _bool_is_builtin = True MAXINT = 2147483647 MININT = -2147483648 PARSE_ERROR = -32700 SERVER_ERROR = -32600 APPLICATION_ERROR = -32500 SYSTEM_ERROR = -32400 TRANSPORT_ERROR = -32300 NOT_WELLFORMED_ERROR = -32700 UNSUPPORTED_ENCODING = -32701 INVALID_ENCODING_CHAR = -32702 INVALID_XMLRPC = -32600 METHOD_NOT_FOUND = -32601 INVALID_METHOD_PARAMS = -32602 INTERNAL_ERROR = -32603 WRAPPERS = WRAPPERS+(Boolean,) FastUnmarshaller = None FastParser = None FastMarshaller = None SgmlopParser = None False = False True = True

Imports: re, string, time, operator, IntType, TypeType, BooleanType, CodeType, UnboundMethodType, StringType, BuiltinMethodType, FloatType, DictionaryType, NotImplementedType, BuiltinFunctionType, DictProxyType, GeneratorType, InstanceType, ObjectType, DictType, GetSetDescriptorType, FileType, EllipsisType, StringTypes, ListType, MethodType, TupleType, ModuleType, FrameType, LongType, BufferType, TracebackType, ClassType, MemberDescriptorType, UnicodeType, SliceType, ComplexType, LambdaType, FunctionType, XRangeType, NoneType, datetime, Boolean, boolean, base64, StringIO, _xmlrpclib, sgmlop, expat


Function Details [hide private]

getparser()

Create an instance of the fastest available parser, and attach it to an unmarshalling object. Return both objects.

Returns: parser, unmarshaller

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.

loads(data, use_datetime=0)

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.


Trees Indices Help
Python Standard Library

AltStyle によって変換されたページ (->オリジナル) /