{"id":27620,"library":"brackettree","title":"BracketTree","description":"A Python library for parsing bracket-delimited strings into tree structures, enabling nested representation from indentation or bracket patterns. Version 0.2.5 is stable, with infrequent releases.","status":"active","version":"0.2.5","language":"python","source_language":"en","source_url":"https://github.com/itssme/brackettree","tags":["tree","parsing","brackets","nesting"],"install":[{"cmd":"pip install brackettree","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Correct modern import","symbol":"BracketTree","correct":"from brackettree import BracketTree"}],"quickstart":{"code":"from brackettree import BracketTree\n\n# Parse a bracket string into a tree\nbt = BracketTree('[a[bc]]')\ntree = bt.parse()\nprint(tree.to_dict())  # E.g., {'a': {'b': 'c'}}","lang":"python","description":"Parse a simple bracket string into a nested dictionary structure."},"warnings":[{"fix":"Validate bracket balance before parsing, e.g., using a custom check.","message":"BracketTree assumes well-formed brackets; malformed input may lead to unexpected parse results or recursion errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Always pass a non-None string to BracketTree constructor.","message":"The `BracketTree` class constructor with `None` input may raise errors in future versions; always provide a string.","severity":"deprecated","affected_versions":"<0.3.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Provide a string: BracketTree('[a]')","cause":"Instantiating BracketTree without arguments.","error":"TypeError: __init__() missing 1 required positional argument: 'input_string'"},{"fix":"Increase recursion limit or pre-process to reduce nesting depth.","cause":"Deeply nested brackets (e.g., more than 1000 levels).","error":"RecursionError: maximum recursion depth exceeded"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}