System interfaces supporting web services.
itertools
typing
media
xml
Path
calculate_range
calculate_range(ranges, size)
render_xml_directory_listing
render_xml_directory_listing(xs, dl, fl)
Iterator producing the XML elements describing the directory's content.
render_directory_listing
render_directory_listing(directories, files)
Object directory listing.
xml_context_element
xml_context_element(xs, hostname, root)
_render_index_xml
_render_index_xml(xml, routes, rpath)
materialize_xml_index
materialize_xml_index(ctl, root, rpath, rpoints, routes)
_render_index
_render_index(routes, rpath)
materialize_json_index
materialize_json_index(ctl, root, rpath, rpoints, routes)
materialize_text_index
materialize_text_index(ctl, root, rpath, rpoints, routes)
supported_directory_types
supported_directory_types = (
media.type_from_bytes(b'application/json'),
media.type_from_bytes(b'text/xml'),
media.type_from_bytes(b'text/plain'),
)
directory_materialization
directory_materialization = {
media.type_from_bytes(b'application/json'): materialize_json_index,
media.type_from_bytes(b'text/xml'): materialize_xml_index,
media.type_from_bytes(b'text/plain'): materialize_text_index,
}
select_filesystem_resource
select_filesystem_resource(error, routes, ctl, root, rpath)
Identify a target resource and materialize a response.