Handle
Bases:
object
This class represents a DocuShare handle.
DocuShare identifies each object on your DocuShare site with a unique handle like Collection-10101, Document-20202 and Version-123456. This class represents one handle in the canonical way for the PyDocuShare API.
It consists of two parts: type and number. For example, the handle ‘Document-20202’ has ‘Collection’ type and 20202 is the number.
- Parameters
handle_type (HandleType) – Handle type.
handle_number (int) – Handle number.
Attributes Summary
String representation of this handle like "Document-20202".
Handle number.
Handle type.
Methods Summary
from_str
(handle_str)Parse the given string as a DocuShare handle and return Handle instance.
Attributes Documentation
String representation of this handle like “Document-20202”.
- Type
Handle number.
- Type
Handle type.
- Type
Methods Documentation
Parse the given string as a DocuShare handle and return Handle instance.
- Parameters
handle_str (str or bytes-like object) – A string that represents a DocuShare handle like ‘Document-20202’.
- Returns
A canonical instance that represents the given handle.
- Return type
- Raises
InvalidHandleError – If the given string is not a valid DocuShare handle.