architxt.cli.utils#
Functions
| |
| Initialize a forest by loading trees from a list of storage paths (ZODB directories or JSONL files). |
| Load a forest from a list of storage paths (ZODB directories or JSONL files). |
| |
| |
|
- architxt.cli.utils.init_forest(forest, files)[source]#
Initialize a forest by loading trees from a list of storage paths (ZODB directories or JSONL files).
- Parameters:
forest (
Forest) – The forest to initialize.files (
Iterable[str | Path]) – List of file paths to read into the forest.
>>> with ZODBTreeBucket() as forest: ... init_forest(forest, ['forest_dir/', 'forest.jsonl'])
- Return type:
- architxt.cli.utils.load_forest(files)[source]#
Load a forest from a list of storage paths (ZODB directories or JSONL files).
- Parameters:
files (
Iterable[str | Path]) – List of file paths to read into a forest.- Yield:
Trees from the list of data files.
>>> forest = load_forest(['forest_dir/', 'forest.jsonl'])
- Return type:
Generator[Tree, None, None]