wsgidav.lock_manager¶
Description
Implements the LockManager object that provides the locking functionality.
The LockManager requires a LockStorage object to implement persistence. Two alternative lock storage classes are defined in the lock_storage module:
- wsgidav.lock_storage.LockStorageDict
- wsgidav.lock_storage.LockStorageShelve
The lock data model is a dictionary with these fields:
- root:
- Resource URL.
- principal:
- Name of the authenticated user that created the lock.
- type:
- Must be ‘write’.
- scope:
- Must be ‘shared’ or ‘exclusive’.
- depth:
- Must be ‘0’ or ‘infinity’.
- owner:
- String identifying the owner.
- timeout:
- Seconds remaining until lock expiration. This value is passed to create() and refresh()
- expire:
- Converted timeout for persistence: expire = time() + timeout.
- token:
- Automatically generated unique token.
Classes
LockManager (storage) |
Implements locking functionality using a custom storage layer. |
Functions
generate_lock_token () |
|
is_lock_expired (lock) |
|
lock_string (lock_dict) |
Return readable rep. |
normalize_lock_root (path) |
|
validate_lock (lock) |
Other Members
DAVError (status_code[, context_info, …]) |
General error class that is used to signal HTTP and WEBDAV errors. |
DAVErrorCondition (condition_code) |
May be embedded in DAVError instances to store additional data. |
HTTP_LOCKED |
int([x]) -> integer int(x, base=10) -> integer |
PRECONDITION_CODE_LockConflict |
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
ReadWriteLock () |
Read-Write lock class. |
compat |
Tool functions to support Python 2 and 3. |
pformat (object[, indent, width, depth, …]) |
Format a Python object into a pretty-printed representation. |
random |
Random variable generators. |
time |
This module provides various functions to manipulate time values. |
util |
Miscellaneous support functions for WsgiDAV. |