a dictionary-like, file-based cache module for Python
Project description
fcache is a dictionary-like, file-based cache module for Python. It’s simple to use, has an optional write buffer, and is Shelf-compatible.
>>> from fcache.cache import FileCache
>>> mycache = FileCache('myapp')
>>> mycache['foo'] = [1, 2, 3, 4, 5]
>>> mycache['foo']
[1, 2, 3, 4, 5]
>>> mycache['bar'] = 'value'
>>> list(mycache)
['foo', 'bar']
>>> del mycache['foo']
>>> mycache['foo']
...
KeyError: 'foo'
with FileCache('myapp') as mycache:
mycache['foo'] = [1, 2, 3, 4, 5]
Install
To install fcache, use pip:
$ pip install fcache
fcache also requires the appdirs package.
Documentation
fcache’s documentation contains an introduction along with an API overview. For more information on how to get started with fcache, be sure to read the documentation.
Bug/Issues Tracker
fcache uses its GitHub Issues page to track bugs, feature requests, and support questions.
License
fcache is released under the OSI-approved MIT License. See the file LICENSE.txt for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fcache-0.5.0.tar.gz
.
File metadata
- Download URL: fcache-0.5.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7a50d1ec2b2b66b1ab0ab2de6076ec1c9e8b524cfcaea5ff07064bdcd784c9 |
|
MD5 | 262fa87c8a2d85977be0ba444c9f3b40 |
|
BLAKE2b-256 | bf441441c96346698a5f5c2676109911dc4c70b7086755ed15b80164fd4d2f71 |
File details
Details for the file fcache-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: fcache-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fb3af3482456e264fb271213dd1603de6a583afd7d8cc1f0875f37821f58530 |
|
MD5 | f12da0137541a2e161df16335e65d467 |
|
BLAKE2b-256 | cb7fde1c875d8ea4850ec90d57c340007fe2f8a8dbbafd278ab96e5ae3b602fe |