Skip to main content

adds least-recently-used cache management and automatic data timeout to Python's Shelf class.

Project description

Tick Tock adds least-recently-used cache management and automatic data timeout to Python’s Shelf class.

>>> # Make your shelves manage your data based on time and/or size:
... myshelf = ticktock.open('myshelf', timeout=60, maxsize=50)

>>> myshelf['foo'] = 'value'
>>> myshelf['foo']
'value'
>>> # Wait 60 seconds, then try again:
... myshelf['foo']
    ...
    KeyError: 'foo'

>>> len(myshelf)
50
>>> myshelf['bar'] = 'value'
>>> # Adding 'bar' kicks the least-recently-used key off the Shelf
... len(myshelf)
50

Install

Tick Tock supports Python 2.6, 2.7, and 3.

To install, use pip:

$ pip install ticktock

Documentation

Tick Tock’s documentation contains a gentle introduction along with a complete API overview. For more information on how to get started with Tick Tock, this is where you should look.

Bug/Issues Tracker

Tick Tock uses its GitHub Issues page to track bugs, feature requests, and support questions.

License

Tick Tock 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

ticktock-0.1.1.tar.gz (16.5 kB view details)

Uploaded Source

File details

Details for the file ticktock-0.1.1.tar.gz.

File metadata

  • Download URL: ticktock-0.1.1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ticktock-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2c9dd992ed14dd63c1e818b69df316505865c347dd848c26031d8548f78360cc
MD5 25621e3e28a6b0bf28e213e839978e42
BLAKE2b-256 9a6942b0f8f825c171ba4ba83e42e655a9a17d59d0588ce1acc6f61392a10a17

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