$XDG_CACHE_HOME read/write
Project description
Install
$ [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")
readme-md - README.md generator
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.3.2.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for xdg_cache-2019.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d24663924817297ae075ccb3fd7d0d03d2c7d6dfe8b6d0aa854e696bb5985fe3 |
|
MD5 | 0c3b43f1a9f36290fae3368da5fd1d58 |
|
BLAKE2b-256 | 619061e90fa441b9222221d6a611b7b3b9fde1a234274837d1916692470eef26 |