Skip to main content

Python bindings for the foyer Rust hybrid cache library.

Project description

foyer-py

Python bindings for the Rust foyer hybrid cache library.

foyer-py is published on PyPI and imported as foyer.

Current status

  • Sync in-memory cache bindings are available.
  • Sync hybrid cache bindings are available (internally uses Tokio).
  • Keys: bytes, str, int.
  • Values: bytes.

Quick start

import foyer

cache = foyer.Cache(16)
cache.insert("hello", b"world")

assert cache.get("hello") == b"world"
assert cache.contains("hello")
assert cache.entries == 1

Hybrid cache (sync API)

import tempfile
import foyer

with tempfile.TemporaryDirectory() as path:
    cache = foyer.HybridCache(path, memory_capacity=64 * 1024 * 1024, storage_capacity=256 * 1024 * 1024)
    cache.insert(42, b"The answer")
    assert cache.get(42) == b"The answer"
    cache.close()

Wheel coverage

GitHub Actions builds wheels for:

  • Linux: x86_64, aarch64 (manylinux)
  • macOS: universal2 (Intel + Apple Silicon)
  • Windows: x86_64

Releases are published from tags matching v* (for example v0.0.3).

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

foyer_py-0.0.5.tar.gz (14.6 kB view details)

Uploaded Source

Built Distributions

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

foyer_py-0.0.5-cp312-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.12+Windows x86-64

foyer_py-0.0.5-cp312-abi3-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ x86-64

foyer_py-0.0.5-cp312-abi3-manylinux_2_28_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

foyer_py-0.0.5-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (2.6 MB view details)

Uploaded CPython 3.12+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file foyer_py-0.0.5.tar.gz.

File metadata

  • Download URL: foyer_py-0.0.5.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for foyer_py-0.0.5.tar.gz
Algorithm Hash digest
SHA256 34be07b2d2de089883eb52cc7cf4037db23b991d1791fd08dd512cb29ed118cf
MD5 750b0aa17defb64c60c8a8ff93a596bb
BLAKE2b-256 f6c6675421a48daa76d1f5db3c6057f8c4a22683572cddec5fe54df162e4cd07

See more details on using hashes here.

Provenance

The following attestation bundles were made for foyer_py-0.0.5.tar.gz:

Publisher: release.yml on icestreamlabs/foyer-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foyer_py-0.0.5-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: foyer_py-0.0.5-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for foyer_py-0.0.5-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a2d3eb95054def52d05d298d0fe7eb334e00a3242abaa1183a7bf871002788db
MD5 b1014fd5cf516ecf92b95c7a0f959665
BLAKE2b-256 132a7369ea082684a7f857ab1214a115011891a751ea567f70b4120d9be3b57d

See more details on using hashes here.

Provenance

The following attestation bundles were made for foyer_py-0.0.5-cp312-abi3-win_amd64.whl:

Publisher: release.yml on icestreamlabs/foyer-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foyer_py-0.0.5-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for foyer_py-0.0.5-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9149adbc8a02e676206e4f2d1a109a8a477efce875d14dbcc3bb49838258b3db
MD5 aad22de5b78767a4a08748a7c3266b2f
BLAKE2b-256 f05b16f5f032819c75ce7db17954ca2a8202c2ef6277632230ce0c06b433fa1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for foyer_py-0.0.5-cp312-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on icestreamlabs/foyer-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foyer_py-0.0.5-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for foyer_py-0.0.5-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a86a64c798afa2e828510e487081c0eeab7b2223c2b508a85da7c050160b7264
MD5 7b4544bd879446e8512182a8bb22d201
BLAKE2b-256 94372edb0f5ea9c82f064af1b8e184badc7c333c63298cb60fae9e8225252fc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for foyer_py-0.0.5-cp312-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on icestreamlabs/foyer-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foyer_py-0.0.5-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for foyer_py-0.0.5-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d8c0a74c3d6835efda7c0d0b4e8f719c219be3ab847fc08db19387472054f593
MD5 9e4a199635c649284c3498dac6f3a88f
BLAKE2b-256 cf09f8a609eabfc291ca1c8e751653947c99b5f94a23b7ca1815d5e42929ac3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for foyer_py-0.0.5-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on icestreamlabs/foyer-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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