Skip to content

congma/lru_ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub CI Travis-CI.com status Coverity Scan Build Status Documentation Status

Synopsis

lru_ng provides a Python type for fixed-size, dict like mapping object lru_ng.LRUDict that performs cache replacement in the least-recently used (LRU) order.

This is a fork of the original module lru. The new iteration of the module is intended for better thread-safety, more robust performance, and greater compatibility with Python 3.

Limited compatibility with lru can be achieved by the Python import

from lru_ng import LRUDict as LRU

For more information, please consult the documentation and pydoc lru_ng.

Documentation

Full documentation can be read online at https://lru-ng.readthedocs.io/

The documentation source written in reStructuredText is contained in the doc/source directory. You can build a local copy of the HTML pages using Sphinx and read them in a Web browser. The following commands (executed from the repository directory) shall install sphinx and supporting packages, then build the pages:

pip install sphinx sphinx_rtd_theme
cd doc && make html

The pages are now under the doc/build/html path, and the home page is index.html.

Installation

You can install the latest version from PyPI using pip.

pip install -U lru_ng

Requirements:

  • CPython >= 3.6.
  • A C compiler that supports C99 syntax.
  • Python development headers.
  • setuptools

To build and install a snapshot version, you can issue the command

python setup.py wheel

in the repository directory and install the wheel with pip.

About

A fork of https://github.com/amitdev/lru-dict supporting newer style and better safety in threaded applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published