Installation¶
Requirements¶
HRCP requires Python 3.11 or later.
Install from PyPI¶
The recommended way to install HRCP is via pip:
Install with uv¶
If you're using uv, the fast Python package manager:
Install from Source¶
To install the latest development version:
Or clone and install locally:
Verify Installation¶
Zero Dependencies¶
HRCP has no runtime dependencies. It uses only Python's standard library:
jsonfor serializationrefor wildcard pattern matchingcollections.abcfor type hints
This makes HRCP lightweight, fast to install, and free from dependency conflicts.
Serialization Formats¶
HRCP provides built-in support for:
| Format | Methods | Notes |
|---|---|---|
| JSON | to_json(), from_json() |
Built-in, no dependencies |
| Dict | to_dict(), from_dict() |
For programmatic use |
Using Other Formats¶
Since to_dict() returns a standard Python dict, you can easily serialize to any format:
# YAML example (requires: pip install pyyaml)
def save_as_yaml(tree, path):
import yaml
with open(path, "w") as f:
yaml.dump(tree.to_dict(), f)
# TOML example (requires: pip install tomli-w)
def save_as_toml(tree, path):
import tomli_w
with open(path, "wb") as f:
tomli_w.dump(tree.to_dict(), f)
Next Steps¶
Now that you have HRCP installed, head to the Quick Start guide to build your first resource tree.