lawwenda.sharehttpapp package¶
Submodules¶
lawwenda.sharehttpapp.davprop module¶
WebDAV properties.
-
class
lawwenda.sharehttpapp.davprop.
CommentDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
Custom WebDAV property {DAV:xattr}xdg.comment that mirrors
lawwenda.fs.Filesystem.Node.comment
.-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
class
lawwenda.sharehttpapp.davprop.
DavProp
(davname, *, is_writable)¶ Bases:
object
Base class for WebDAV properties.
Each subclass implements one particular property as used in e.g. PROPFIND requests.
Must be registered with
register_prop()
.- Parameters
davname (str) –
is_writable (bool) –
-
property
davname
¶ The name of this property.
- Return type
str
-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode (lawwenda.fs.Filesystem.Node) – The node to inquire.
- Return type
Optional[str]
-
property
is_writable
¶ Whether this property can also be modified (in contrast to read-only properties like the file size).
- Return type
bool
-
class
lawwenda.sharehttpapp.davprop.
GeoDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
Custom WebDAV property {DAV:xattr}pino.geo that mirrors
lawwenda.fs.Filesystem.Node.geo
.-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
class
lawwenda.sharehttpapp.davprop.
MtimeDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
The WebDAV getlastmodified property.
-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
class
lawwenda.sharehttpapp.davprop.
RatingDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
Custom WebDAV property {DAV:xattr}baloo.rating that mirrors
lawwenda.fs.Filesystem.Node.rating
.-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
class
lawwenda.sharehttpapp.davprop.
ResourceTypeDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
The WebDAV resourcetype property.
-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
class
lawwenda.sharehttpapp.davprop.
SizeDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
The WebDAV getcontentlength property.
-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
class
lawwenda.sharehttpapp.davprop.
TagsDavProp
¶ Bases:
lawwenda.sharehttpapp.davprop.DavProp
Custom WebDAV property {DAV:xattr}xdg.tags that mirrors
lawwenda.fs.Filesystem.Node.tagstring
.-
get_for_node
(fsnode)¶ Return the property value for a node.
- Parameters
fsnode – The node to inquire.
-
-
lawwenda.sharehttpapp.davprop.
get_prop_by_davname
(davname)¶ Return a DavProp by name or None if no such ones exist.
- Parameters
davname (str) – The name to find, as used in WebDAV.
- Return type
Optional[lawwenda.sharehttpapp.davprop.DavProp]
Module contents¶
A wsgi application that provides an http interface to a filesystem.
See ShareHttpApp
.
-
class
lawwenda.sharehttpapp.
ShareHttpApp
(filesystem)¶ Bases:
object
A wsgi application that provides an http interface to a filesystem.
It provides bare http access, and also WebDAV extensions for a more complete interface. It does not provide an own user interface or user authentication.
- Parameters
filesystem (lawwenda.fs.Filesystem) –
-
property
__allowed_methods
¶ - Return type
t.List[str]
-
_method_copy
(request, fsnode, *, xfermethod='copy_to')¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
xfermethod (str) –
-
_method_delete
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_get
(request, fsnode, is_head_request=False)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
is_head_request (bool) –
-
_method_head
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_mkcol
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_move
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_options
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_propfind
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_proppatch
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
_method_put
(request, fsnode)¶ - Parameters
request (lawwenda.comm.Request) –
fsnode (lawwenda.fs.Filesystem.Node) –
-
property
filesystem
¶ The filesystem used by this ShareHttpApp.
- Return type