Skip to main content

$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")

python-readme-generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xdg-cache, version 2019.4.13
Filename, size File type Python version Upload date Hashes
Filename, size xdg-cache-2019.4.13.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page