Metadata-Version: 2.4
Name: foyer-py
Version: 0.0.3
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries
License-File: LICENSE
Summary: Python bindings for the foyer Rust hybrid cache library.
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/icestreamlabs/foyer-py
Project-URL: Issues, https://github.com/icestreamlabs/foyer-py/issues
Project-URL: Repository, https://github.com/icestreamlabs/foyer-py

# foyer-py

Python bindings for the Rust [`foyer`](https://github.com/foyer-rs/foyer) hybrid cache library.

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

## Current status

- Sync in-memory cache bindings are available.
- Keys: `bytes`, `str`, `int`.
- Values: `bytes`.

## Quick start

```python
import foyer

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

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

## Wheel coverage

GitHub Actions builds wheels for:

- Linux: `x86_64`, `aarch64`, `ppc64le`, `s390x` (manylinux)
- macOS: `universal2` (Intel + Apple Silicon)
- Windows: `x86_64`

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

