$XDG_CACHE_HOME read/write files
Project description
Installation
$ [sudo] pip install xdg-cache
Functions
function | __doc__ |
---|---|
xdg_cache.exists(key) |
return True if cache exists, else False |
xdg_cache.read(key) |
return a file content string, return None if cache not exist |
xdg_cache.rm(key) |
remove cache file |
xdg_cache.write(key, string) |
write string to cache |
Examples
>>> import xdg_cache
>>> xdg_cache.write("key",'value')
>>> xdg_cache.read("key")
'value'
>>> xdg_cache.path("key")
'~/.cache/key'
>>> xdg_cache.exists("key")
True
>>> xdg_cache.rm("key")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xdg-cache-2019.4.13.tar.gz
(1.6 kB
view hashes)