Package itools :: Package uri

Package uri

The purpose of this package is to implement URIs (Uniform Resource Identifiers) as specified by RFC2396.
Classes
  Path
A path is a sequence of segments.
  Reference
A common URI reference is made of five components:
Functions
 
decode_query(data, schema=None)
Decodes a query as defined by the "application/x-www-form-urlencoded" content type.
 
encode_query(query, schema=None)
This method encodes a query as defined by the "application/x-www-form-urlencoded" content type (see http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1 for details)
 
get_host_from_authority(auth)
Get the host from the authority.
 
get_reference(reference)
Returns a URI reference of the good type from the given string.
 
get_scheme(name)
 
get_uri_name(uri)
 
get_uri_path(uri)
 
register_scheme(name, handler)
 
resolve_name(base, name)
 
resolve_uri(base, reference)
 
resolve_uri2(base, reference)
Function Details

decode_query(data, schema=None)

 

Decodes a query as defined by the "application/x-www-form-urlencoded" content type.

The value expected is a byte string like "a=1&b=2"; the value returned is a dictonary like {'a': 1, 'b': 2}.

See http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1 for details.

encode_query(query, schema=None)

 

This method encodes a query as defined by the "application/x-www-form-urlencoded" content type (see http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1 for details)

The value expected is a dictonary like {'a': 1, 'b': 2}. The value returned is a byte string like "a=1&b=2".

get_host_from_authority(auth)

 

Get the host from the authority. The format of the authority is:

[userinfo@]host[:port]