Catalog PyPI
PACKAGE EXPLORERView in registry

ai-cachekit

PyPI

Universal caching system for AI responses with support for memory, file (JSON), and Redis backends.

aicachefilememoryredissqlite
Versions collected1
Direct dependencies1From release 1.0.0
Last observed21 Oct, 10:04 UTC

README

Version 1.0.0 documentation

AI CacheKit

Tests PyPI version License: MIT

Lightweight caching library for AI/LLM API responses.
Reduce costs and improve performance by storing API responses locally with hash-based keys and optional TTL.


Features

  • 🔹 Simple API: get, set
  • 🔹 Local JSON storage (no external DB required)
  • 🔹 Optional TTL (time-to-live) for cache expiration
  • 🔹 Perfect for OpenAI, Anthropic, Ollama, etc.

Installation

From GitHub (development version):

pip install git+https://github.com/EDLadder/ai-cachekit.git

From PyPI (after release):

pip install ai-cachekit

Usage

from ai_cachekit import AIResponseCache

cache = AIResponseCache(backend="memory")
cache.set("question", "answer")
print(cache.get("question"))

File-Based Cache (JSON)

cache = AIResponseCache(backend="file", filepath="my_cache.json")
cache.set("key", "value")
print(cache.get("key"))

Redis Cache

cache = AIResponseCache(backend="redis", host="localhost", port=6379)
cache.set("key", "value")
print(cache.get("key"))

Why?

  • Avoid repeated API calls (save cost & time)
  • Minimal dependencies and setup
  • Flexible for any AI API (OpenAI, LLaMA, etc.)

Development

Clone repo and install dev dependencies:

git clone https://github.com/EDLadder/ai-cachekit.git
cd ai-cachekit
pip install -r requirements.txt
pytest

Plans

  • Support for Redis and SQLite backends.
  • CLI tool for managing cache.
  • Built-in stats: hit rate, saved cost estimation.
  • Encryption for cached data.

License

MIT License – free to use and modify.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.07 Aug 20251

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
edladder/ai-cachekit

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:04 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:740f20bea90bf020a8efb6f3b7e49b841f483ead160ea9da884711e40ad64e28