Skip to main content

iot-lru-cache

python version pre-commit Keep a Changelog CI_CD GitHub_Actions package PyPI

This package is an implementation of a Least Recently Used (LRU) caching algorithm for optimized caching on an IoT edge device.

Official Documentation | Source code | Package PyPI

Table of Contents

Versioning

This repository adheres to Semantic Versioning. It will be maintained through the CHANGELOG.md and in GitHub Releases. It's important to note that you must maintain the version with your releases in iot/lru/cache/_version.py, otherwise a new package version will fail to get published.

Getting Started

This section provides basic examples with the iot-lru-cache.

Prerequisites

  • Python 3.7 or later is required to use this package.

Basic Examples

  1. Install via pip:
pip install iot-lru-cache
  1. Import and say hello:
from iot.lru.cache import __version__

print(f"hello world from iot-lru-cache version: {__version__}")
  1. Basic usage:
from iot.lru.cache import IoTLRUCache

# instantiate cache
cache = IoTLRUCache(capacity=100)

# print info w/ repr
print(f"{cache.__repr__()}")

# add a key-value pair to the cache
cache.put(key="my_key", value={"my": "value"})

# retrieve the value for a given key (returns -1 if not found)
val = cache.get(key="my_key")

Metadata

Release files for iot-lru-cache 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iot-lru-cache 1.0.0
File Size Uploaded Provenance
iot-lru-cache-1.0.0.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for iot-lru-cache 1.0.0
File Interpreter ABI Platform
iot_lru_cache-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / iot-lru-cache-1.0.0.tar.gz

Download URL iot-lru-cache-1.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
05fbbca28f1445b1ba2d18831e80c0414487f8a892bd56fb25c188c0c22e75fa
BLAKE2b-256 checksum
How to use checksums
f70f063f5a9f8dafae3797faa15afa9ff1ebebe0b8541dba5e73335f6f9a23b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / iot_lru_cache-1.0.0-py3-none-any.whl

Download URL iot_lru_cache-1.0.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3689d13e30dd8ef31a37f1da6af08ee2f4e96951f0001f835d9ce58c1e09fad
BLAKE2b-256 checksum
How to use checksums
02b7b95df2d8a2ec2295403aa79a05be937dfe271d02f5aab14b4bd95b81b475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Security for iot-lru-cache 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page