Unified Entity Card helpers
Project description
Unified Entity Card Python Library
Lightweight helpers for creating, converting, validating, and tooling Unified Entity Cards (v1 and v2).
PyPI: https://pypi.org/project/unified-entity-card/
Usage
from uec import create_character_uec_v2, validate_uec, convert_uec_v1_to_v2
v2 = create_character_uec_v2({
"id": "char-v2-1",
"name": "Aster Vale",
})
result = validate_uec(v2, strict=False)
print(result.ok)
v1 = {
"schema": {"name": "UEC", "version": "1.0"},
"kind": "character",
"payload": {"id": "char-1", "name": "Aster"},
}
upgraded = convert_uec_v1_to_v2(v1)
Highlights
- Supports schema versions
1.0and2.0 - Version-aware validation
- v1 -> v2 conversion helper
- Parsing, normalization, and stable stringification
- Upgrade/downgrade helpers
- Diff and merge helpers
- Asset extraction/rewriting helpers
- Lint-style quality checks
Main API
create_uec,create_character_uec,create_persona_ueccreate_character_uec_v2,create_persona_uec_v2validate_uec,validate_uec_strict,validate_uec_at_versionconvert_uec_v1_to_v2,upgrade_uec,downgrade_uecparse_uec,normalize_uec,stringify_uecdiff_uec,merge_uecextract_assets,rewrite_assets,lint_uec
Tests
cd python && python -m unittest discover -s tests -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unified_entity_card-0.2.0.tar.gz
(12.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unified_entity_card-0.2.0.tar.gz.
File metadata
- Download URL: unified_entity_card-0.2.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e075998b9b3cb0bbffcea8a8f83d4fb71b0f8ee46cb7b290322aaee420dd5327
|
|
| MD5 |
85235d2545cf9e1f541cbe17d3fbd95c
|
|
| BLAKE2b-256 |
16cd23c93b91ccaf0145ed3365707220013d1aaf3e75c80ffab5e3c56f8452d6
|
File details
Details for the file unified_entity_card-0.2.0-py3-none-any.whl.
File metadata
- Download URL: unified_entity_card-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
656b360edda36c0320cc3608963af9579184a5066ddfe872c136a3b7fcaf5b96
|
|
| MD5 |
d7f719a81390baaafed0862cb1ab28e8
|
|
| BLAKE2b-256 |
726acfce96f7addab673f36e209eb0ee59748c15135dd9f513d136edd53bfe44
|