Skip to main content

Declarative cache invalidation for Python

Project description

t87s

Declarative cache invalidation for Python.

Install

pip install t87s              # Core + MemoryAdapter
pip install t87s[redis]       # + Redis support
pip install t87s[all]         # Everything

Quick Start

from t87s import T87s, MemoryAdapter, define_tags, QueryConfig

tags = define_tags({
    "user": lambda id: ("user", id),
})

t87s = T87s(adapter=MemoryAdapter())

@t87s.query
def get_user(id: str) -> QueryConfig[User]:
    return QueryConfig(
        tags=[tags["user"](id)],
        ttl="5m",
        fn=lambda: db.get_user(id),
    )

Full documentation: https://docs.t87s.dev

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

t87s-0.0.0.tar.gz (57.2 kB view details)

Uploaded Source

Built Distribution

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

t87s-0.0.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file t87s-0.0.0.tar.gz.

File metadata

  • Download URL: t87s-0.0.0.tar.gz
  • Upload date:
  • Size: 57.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for t87s-0.0.0.tar.gz
Algorithm Hash digest
SHA256 657e36abed99e7af0fa38b09e6dc10dd299a017e46a8131d391862131264749e
MD5 3d0805ae748e40f47b5d22494b344f50
BLAKE2b-256 56968bb9ccf64ff903a3aefbdebf31ed73bb36d972941b48e32569047f4ba4e0

See more details on using hashes here.

File details

Details for the file t87s-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: t87s-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for t87s-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd1a94ba0369a72bea81f23e174bb2e5b78aa43bf08234579f784cb37feb6df7
MD5 98f0e5666ec5390cf5232725e57ba18a
BLAKE2b-256 136b84973fe0b2fec078cfbf5e5681437fbeda0921ce85fef7715367ad2e75b9

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