Metadata-Version: 2.4
Name: virtuals-binary-codec
Version: 0.1.0
Summary: Cython-optimized binary key codec for Virtuals.
Author-email: Gor Arakelyan <gorarkln@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/nustackdev/virtuals
Project-URL: Repository, https://github.com/nustackdev/virtuals
Project-URL: Issues, https://github.com/nustackdev/virtuals/issues
Project-URL: PyPI, https://pypi.org/project/virtuals-binary-codec/
Keywords: virtuals,codec,binary,cython,key-value
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Cython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: Cython>=3.0.0; extra == "dev"
Requires-Dist: setuptools>=68.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Dynamic: license-file

# virtuals-binary-codec

Cython-optimized binary key codec for [Virtuals](https://github.com/nustackdev/virtuals).

Encodes tuple keys into binary format while preserving lexicographic ordering. Supports mixed integer and string components.

## Install

```
pip install virtuals-binary-codec
```

Or as part of Virtuals:

```
pip install virtuals-py[binary]
```

## Usage

```python
from virtuals_binary_codec import BinaryKeyCodec

codec = BinaryKeyCodec()
encoded = codec.encode(("users", 42, "profile"))
decoded = codec.decode(encoded)
assert decoded == ("users", 42, "profile")
```

Virtuals automatically uses this codec when installed. Without it, Virtuals falls back to a pure Python implementation.
