Skip to main content

a dictionary-like, file-based cache module for Python

Project description

https://badge.fury.io/py/fcache.svg https://github.com/tsroten/fcache/actions/workflows/ci.yml/badge.svg

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


Download files

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

Source Distribution

fcache-0.5.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

fcache-0.5.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file fcache-0.5.1.tar.gz.

File metadata

  • Download URL: fcache-0.5.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for fcache-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a52dfdc1dcd3941ad9d6ce4f48886b6cbd48edd71cb9b4e7755aa3684c30b3ea
MD5 c5a6b7a3bd31cf59f712967b492c0486
BLAKE2b-256 69aff2aab89e8d422f553c9618b4b19e0461edf478e5e6b30c41a3356261306e

See more details on using hashes here.

File details

Details for the file fcache-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: fcache-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for fcache-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4d95c8e05a35e0166623aecd25e236be159e2e8284e62c6bf05cdd9db660971
MD5 ed6c14d7bb89110ca8d8848e2178c1a2
BLAKE2b-256 eeac8e0ac945b56e17c849ed7af53040caf311c01fa6ee049ec782d8533cb693

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page