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).
- Native async APIs are available for both cache types.
- 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()
Async APIs
import asyncio
import tempfile
import foyer
async def main() -> None:
cache = foyer.AsyncCache(16)
await cache.insert("hello", b"world")
assert await cache.get("hello") == b"world"
with tempfile.TemporaryDirectory() as path:
hybrid = await foyer.AsyncHybridCache.create(path)
await hybrid.insert(42, b"The answer")
assert await hybrid.get(42) == b"The answer"
await hybrid.close()
asyncio.run(main())
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).
Metadata
Release files for foyer-py 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| foyer_py-0.0.6.tar.gz | 15.7 kB | With provenance | Details for foyer_py-0.0.6.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| foyer_py-0.0.6-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for foyer_py-0.0.6-cp312-abi3-win_amd64.whl |
| foyer_py-0.0.6-cp312-abi3-manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64 | Details for foyer_py-0.0.6-cp312-abi3-manylinux_2_28_x86_64.whl |
| foyer_py-0.0.6-cp312-abi3-manylinux_2_28_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ ARM64 | Details for foyer_py-0.0.6-cp312-abi3-manylinux_2_28_aarch64.whl |
| foyer_py-0.0.6-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 | Details for foyer_py-0.0.6-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 7.7 MB
Release files / foyer_py-0.0.6.tar.gz
| Download URL | foyer_py-0.0.6.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ac122b1aa0e30d59ed883e098e3559c0c8a1a2ebba715e9fc9e6c7802f1f42a
|
|
BLAKE2b-256 checksum How to use checksums |
17af9bd09c8d8234e3da95e04c5c49c07e1aecefe92a6719a733fba63b58a3a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logRelease files / foyer_py-0.0.6-cp312-abi3-win_amd64.whl
| Download URL | foyer_py-0.0.6-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
82b838b674bb1bdb54f1cfe61f502469ffb6484b0d7a3e1257e7172abc53e5a1
|
|
BLAKE2b-256 checksum How to use checksums |
5d0c516913f8a6e30e585315707be71512dd33e2e6c25230dc241b4e4dd46885
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logRelease files / foyer_py-0.0.6-cp312-abi3-manylinux_2_28_x86_64.whl
| Download URL | foyer_py-0.0.6-cp312-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aba0b95ad3f5cefdf2e75116fbbb1a37a144318220260be23c9ff51270f040c3
|
|
BLAKE2b-256 checksum How to use checksums |
6f574905371ad370282df8907b88833caebca38bad7217014f24c19f287d17a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logRelease files / foyer_py-0.0.6-cp312-abi3-manylinux_2_28_aarch64.whl
| Download URL | foyer_py-0.0.6-cp312-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
2d476756d5d849631e5f4638d22d63ecffeb2e9df29b0cc485d304d45d64df0c
|
|
BLAKE2b-256 checksum How to use checksums |
308cecbc7f066e5a96dda784c1d0493612d3315e60e8480c7b9320a240220b74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logRelease files / foyer_py-0.0.6-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | foyer_py-0.0.6-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
93739ef90e48a0d052cf2fb910544c8bfd3c1997d895ad2dc10aed048b6861e0
|
|
BLAKE2b-256 checksum How to use checksums |
c1dcfb2b3e4fdc76fbf80c5d6a378b95778d1e53166e275e0e0331c06dff2f32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logSecurity for foyer-py 0.0.6
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.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for foyer_py-0.0.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logA 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.