# pyPathLikeDict **Repository Path**: colorthoro/py-path-like-dict ## Basic Information - **Project Name**: pyPathLikeDict - **Description**: 借鉴pathlib的Path链式操作方式,简化深字典的操作。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-16 - **Last Updated**: 2025-08-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PathLikeDict 借鉴 pathlib.Path 链式操作方式,简化深字典的操作。 ## 安装 使用以下命令安装: `pip install PathLikeDict` ## 使用 ```python import DeepDict adict = {} bdict = DeepDict(adict).path('a.b.c').set('d', 1).path(['e', 'f']).set('g', 2) print(adict) print(bdict) # {'a': {'b': {'c': {'d': 1, 'e': {'f': {'g': 2}}}}}} # {'g': 2} bdict.path('wow').set(['a', 'b', 'c'], [3, 4, 5]) print(adict) print(bdict) # {'a': {'b': {'c': {'d': 1, 'e': {'f': {'g': 2, 'wow': {'a': 3, 'b': 4, 'c': 5}}}}}}} # {'a': 3, 'b': 4, 'c': 5} ``` ## 贡献 欢迎提交 pull request 来改进 PathLikeDict。 ## 许可 MIT