Metadata-Version: 2.4
Name: manacost-deckstrings
Version: 1.0.0
Summary: Dependency-free Hearthstone deckstring codec, validation, and clipboard export library
Author: Manacost Labs
License-Expression: ISC
Project-URL: Homepage, https://github.com/Manacost-Labs/deckstrings
Project-URL: Issues, https://github.com/Manacost-Labs/deckstrings/issues
Project-URL: Repository, https://github.com/Manacost-Labs/deckstrings.git
Keywords: hearthstone,deckstrings
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: build==1.5.0; extra == "dev"
Requires-Dist: jsonschema==4.26.0; extra == "dev"
Requires-Dist: mypy==2.3.0; extra == "dev"
Requires-Dist: pytest==9.1.1; extra == "dev"
Requires-Dist: ruff==0.16.2; extra == "dev"
Requires-Dist: setuptools==83.0.0; extra == "dev"
Requires-Dist: twine==7.0.0; extra == "dev"
Dynamic: license-file

# Manacost Labs Hearthstone Deckstrings for Python

A dependency-free Python 3.10+ implementation of the shared deckstring contract
in this repository.

```bash
python -m pip install manacost-deckstrings
```

## Usage

```python
from manacost_deckstrings import canonicalize, decode, encode, validate

deck = decode("AAEBAQcBBAMBAgMAAA==")
result = validate(deck)
canonical_deck = canonicalize(deck)
deckstring = encode(deck)
```

Full Hearthstone clipboard exports are supported without card data or network
access:

```python
from manacost_deckstrings import format_export, parse_export

parsed = parse_export(export_text)
text = format_export(parsed["deck"], parsed["metadata"])
```

`format_export` also accepts an optional resolver callable. It receives a card
DBF ID and returns `{"name": "Card", "cost": 3}` or `None`.

## Errors

The returned dictionary follows the shared
[deck schema](https://github.com/Manacost-Labs/deckstrings/blob/main/spec/deck.schema.json).

Invalid input raises `DeckstringError`. Its `code` attribute follows the shared
[error contract](https://github.com/Manacost-Labs/deckstrings/blob/main/spec/README.md);
callers should not match the human-readable message.

The package is release-ready for PyPI. Published releases use semantic
versioning and support Python 3.10 through 3.14.
