Skip to main content

Official Python SDK for cachly.dev – Managed Valkey/Redis cache with semantic AI caching

Project description

Stop Rebuilding Context. Start Shipping Faster.

cachly Python SDK — The cache that remembers everything so your AI assistant doesn't have to start from scratch every morning.

PyPI Python 3.10+ License: MIT GDPR: EU-only


The Problem Nobody Talks About

You open Cursor. You ask it to continue where you left off. It doesn't know what "where you left off" means.

You explain your architecture. Again.
You explain why you use that pattern. Again.
You explain the bug you fixed last Tuesday. Again.

The average developer wastes 45 minutes per day just re-establishing context with their AI assistant. That's 3.5 hours a week. 180 hours a year. Gone.

And then there's the infrastructure tax: your AI hits your database for every request. Your LLM bills are exploding. Your p99 is embarrassing. Your GDPR officer won't stop emailing you about US data residency.


cachly fixes both.

Two products. One connection string. Zero ops.


🧠 AI Dev Brain — Your AI Assistant's Permanent Memory

Give Claude Code, Cursor, GitHub Copilot, and Windsurf a brain that persists across every session, every machine, every restart:

npx @cachly-dev/init

From this moment, your AI assistant will:

  • Remember every bug fix and the exact command that solved it
  • Know your architecture without you explaining it again
  • Resume work exactly where you left off, every single session
  • Reuse known solutions instead of re-researching — saving ~1,200 tokens per recall

Before cachly: "Let me analyze your codebase... reading 47 files..."
After cachly: "Last session: deployed blue/green API, 23 lessons stored. Ready."

Configure in ~/.vscode/mcp.json, .cursor/mcp.json, or .mcp.json:

{
  "servers": {
    "cachly": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cachly-dev/mcp-server"],
      "env": { "CACHLY_JWT": "your-jwt-token" }
    }
  }
}

→ Full docs: cachly.dev/docs/ai-memory


⚡ Managed Cache — Sub-millisecond, GDPR-Compliant, German Servers

Installation

pip install cachly
# or
uv add cachly

Quick Start

import os
from cachly import CachlyClient

cache = CachlyClient(url=os.environ["CACHLY_URL"])

# Cache LLM responses, user sessions, computed results
cache.set("user:42", {"name": "Alice"}, ttl=300)
user = cache.get("user:42")

# Get-or-Set: never hit the DB twice
report = cache.get_or_set("report:monthly", lambda: db.run_expensive_report(), ttl=3600)

# Atomic counter
views = cache.incr("page:views")

cache.close()

Create your free instance → No credit card. Live in 30 seconds.


With vs. Without cachly

Situation Without cachly With cachly
AI session start 5–10 min re-explaining context < 10 sec, full context loaded
Same DB query, 1000 req/s 1,000 DB hits 1 DB hit, 999 cache hits
LLM API costs for repeated prompts Pay every time Pay once, cache the rest
GDPR compliance for EU users Data leaves EU (US Redis) Data stays in Germany, always
Infra setup Days of ops work 30 seconds, zero ops
Architecture knowledge after holiday Starts from zero Fully briefed in seconds
Debugging a known issue Re-research from scratch Instant: "you fixed this on March 12"
p99 latency (uncached) 200–800ms (DB) < 1ms (cache hit)

Semantic Cache — Cut LLM Costs by 40–70%

Stop paying for the same answer twice:

sem = cache.semantic_cache(embed_fn=openai.embed, threshold=0.92, ttl=86400)

result = sem.get(user_query)
if result is None:
    answer = call_your_llm(user_query)
    sem.set(user_query, answer)

👥 Team Brain — Shared AI Memory for Your Whole Team

One shared instance. Every developer gets smarter every day.

# .env — same instance for the whole team
CACHLY_INSTANCE_ID=your-shared-team-instance

# Alice fixes a bug, stores the lesson:
brain.learn_from_attempts(
    topic="deploy:k8s-timeout",
    outcome="success",
    what_worked="Increase readinessProbe.failureThreshold to 10",
    author="alice"
)

# Bob starts a session the next day:
brain.session_start()
# → "💡 alice solved deploy:k8s-timeout 1d ago: Increase readinessProbe..."

Set up a team org at cachly.dev/teams — Team €99/mo · 10 seats · Business €299/mo · 50 seats.


Pricing

Tier RAM Price Best for
Free 25 MB €0/mo Dev & side projects
Dev 200 MB €19/mo Startups, small apps
Pro 900 MB €49/mo Production workloads
Speed 900 MB Dragonfly + Semantic Cache €79/mo AI apps, high QPS
Business 7 GB €199/mo Scale-ups

All plans: German servers · GDPR-compliant · No US data transfer · 99.9% SLA


Links

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

cachly-0.1.0.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cachly-0.1.0-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

Details for the file cachly-0.1.0.tar.gz.

File metadata

  • Download URL: cachly-0.1.0.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for cachly-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9c6fc1717a0711ac7f5a3a4ce262b00caf2245bd360b862d586ee3262dceb92b
MD5 032aee8a3ca56c7dda6e3f433d74a685
BLAKE2b-256 c211527df8ed37e2e6f09c4df57c44f0e2b41b3b64b3d42464426bb3301746c9

See more details on using hashes here.

File details

Details for the file cachly-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cachly-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for cachly-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac7e3cbe938ba9d4a2cb0eccc7a826b8f482decd5a113e9c2b55b9c132289b12
MD5 b2bace362304d85f02b3cfaa3698932e
BLAKE2b-256 bc887f8a14f87c76ca418e31dff46f0b50638fa494c91e2cd822d55b3bb26394

See more details on using hashes here.

Supported by

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