cloudpathlib.enums¶
Classes¶
FileCacheMode
¶
Bases: str
, Enum
Enumeration of the modes available for for the cloudpathlib file cache.
Attributes:
Name | Type | Description |
---|---|---|
persistent |
str
|
Cache is not removed by |
tmp_dir |
str
|
Cache is stored in a
|
cloudpath_object |
str
|
Cache for a |
close_file |
str
|
Cache for a |
Modes can be set by passing them to the Client or by setting the CLOUDPATHLIB_FILE_CACHE_MODE
environment variable.
For more detail, see the caching documentation page.
Source code in cloudpathlib/enums.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
Attributes¶
close_file = 'close_file'
class-attribute
instance-attribute
¶
cloudpath_object = 'cloudpath_object'
class-attribute
instance-attribute
¶
persistent = 'persistent'
class-attribute
instance-attribute
¶
tmp_dir = 'tmp_dir'
class-attribute
instance-attribute
¶
Functions¶
from_environment() -> Optional[FileCacheMode]
classmethod
¶
Parses the environment variable CLOUDPATHLIB_FILE_CACHE_MODE
into
an instance of this Enum.
Returns:
Type | Description |
---|---|
Optional[FileCacheMode]
|
FileCacheMode enum value if the env var is defined, else None. |
Source code in cloudpathlib/enums.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|