$XDG_CACHE_HOME read/write files
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.23.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for xdg_cache-2019.3.23-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41bf08a0eac8607c072e021f136aa94073c2130ff426e1bf1e5516e8d837ef06 |
|
MD5 | 72b325700ab94293956b5767dfcb0fcd |
|
BLAKE2b-256 | ee8bd95e9b8845c582127037ecbff0e98fdb7801e27a82cfe838b813019e3b40 |