creator
index
/home/hermann/Entwürfe/hg/tinydav/tinydav/creator.py

Module with helper functions that generate XML requests.

 
Functions
       
create_lock(scope='exclusive', type_='write', owner=None)
Construct and return XML string for LOCK.
 
scope -- One of "exclusive" or "shared".
type_ -- Only "write" in defined in RFC.
owner -- Optional owner information for lock. Can be any string.
 
Raise ValueError, if illegal scope was given.
create_propfind(names=False, properties=None, include=None, namespaces=None)
Construct and return XML string for PROPFIND.
 
names -- Boolean whether the profind is requesting property names only.
properties -- An iterable containing property names to request. Will only
              by considered when names is False.
include -- An Iterable containing properties that shall be returned by the
           WebDAV server in addition to the properties returned by an
           allprop request.
namespaces -- Mapping (prefix->namespace) with additional namespaces,
              if necessary.
 
If names is False, properties is considered False, an allprop-PROPFIND
request is created.
create_proppatch(setprops, delprops, namespaces=None)
Construct and return XML string for PROPPATCH.
 
setprops -- Mapping with properties to set.
delprops -- Iterable with element names to remove.
namespaces -- Mapping (prefix->namespace) with additional namespaces,
              if necessary.
create_report(properties=None, elements=None, namespaces=None)
Construct and return XML for REPORT.