storage package¶
Submodules¶
tusclient.storage.interface module¶
Interface module defining a url storage API.
-
class
tusclient.storage.interface.
Storage
¶ Bases:
object
-
get_item
(key)¶ Return the tus url of a file, identified by the key specified.
Args: - key[str]: The unique id for the stored item (in this case, url)
Returns: url[str]
-
remove_item
(key)¶ Remove/Delete the url value under the unique key from storage.
-
set_item
(key, value)¶ Store the url value under the unique key.
Args: - key[str]: The unique id to which the item (in this case, url) would be stored.
- value[str]: The actual url value to be stored.
-
tusclient.storage.filestorage module¶
An implementation of <tusclient.storage.interface.Storage>, using a file as storage.
-
class
tusclient.storage.filestorage.
FileStorage
(fp)¶ Bases:
tusclient.storage.interface.Storage
-
get_item
(key)¶ Return the tus url of a file, identified by the key specified.
Args: - key[str]: The unique id for the stored item (in this case, url)
Returns: url[str]
-
remove_item
(key)¶ Remove/Delete the url value under the unique key from storage.
-
set_item
(key, url)¶ Store the url value under the unique key.
Args: - key[str]: The unique id to which the item (in this case, url) would be stored.
- value[str]: The actual url value to be stored.
-