Box: Python Dictionaries with Advanced Dot Notation Access
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Box is a powerful Python library that enhances standard dictionaries with advanced dot notation access. It acts as a near-transparent drop-in replacement, automatically converting nested dictionaries and lists for recursive attribute-style access. This makes working with complex data structures significantly more intuitive and efficient.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Box is a versatile Python library that provides an enhanced dictionary experience, allowing for advanced dot notation access to your data. It serves as a near-transparent drop-in replacement for standard Python dictionaries, making it significantly easier and more intuitive to interact with complex, nested data structures. As a subclass of dict, Box ensures compatibility while introducing powerful features like automatic conversion of nested dictionaries and lists into Box and BoxList objects, respectively, enabling recursive attribute-style access.
Installation
Installing Box is straightforward using pip. It is highly recommended to pin your library versions to avoid unexpected breaking changes between major releases.
To install Box with all its optional dependencies (for YAML, TOML, and msgpack support), use the following command:
pip install python-box[all]~=7.0 --upgrade
For specific dependencies, you can choose them individually:
pip install python-box[ruamel.yaml,tomli_w,msgpack]~=7.0 --upgrade
Box also includes Cython optimizations for major platforms, which can significantly speed up the loading of large datasets. If you encounter a warning about Cython during installation on unsupported systems, you may need to install Python development files, a system compiler, and the Cython and wheel packages before reinstalling Box.
Examples
Box simplifies data access dramatically. Here's a quick example demonstrating its core functionality:
from box import Box
movie_box = Box({ "Robin Hood: Men in Tights": { "imdb stars": 6.7, "length": 104 } })
# Access data using dot notation
print(movie_box.Robin_Hood_Men_in_Tights.imdb_stars)
# Output: 6.7
# Box automatically makes otherwise inaccessible keys safe to access as an attribute.
# You can always pass `conversion_box=False` to `Box` to disable that behavior.
Any new dictionaries or lists added to a Box or BoxList object are automatically converted, allowing for seamless recursive dot notation access throughout your data.
Why Use Box
Box offers several compelling reasons to integrate it into your Python projects:
- Intuitive Data Access: Simplifies interaction with nested dictionaries through easy-to-read dot notation, eliminating repetitive bracket syntax.
- Recursive Conversion: Automatically converts all sub-dictionaries and lists into
BoxandBoxListobjects, maintaining attribute-style access throughout your entire data structure. - Performance: Includes Cython optimizations that can make loading large datasets up to 10 times faster on supported platforms.
- Versatile Converters: Provides helper functions to easily transform Box objects back into standard dictionaries, or export them to various formats like JSON, YAML, TOML, or msgpack strings and files.
- Customization: Offers numerous ways to customize its behavior with different types of boxes, allowing you to tailor it precisely to your specific needs.
Links
- GitHub Repository: https://github.com/cdgriffith/Box
- Official Wiki: https://github.com/cdgriffith/Box/wiki
- PyPI Project: https://pypi.org/project/python-box/
- License: https://github.com/cdgriffith/Box/blob/master/LICENSE
Related repositories
Similar repositories that may be relevant next.

AREX-Skill: A Skill Library for Automated Machine Learning and Auto-Research
September 21, 2026
AREX-Skill is a powerful skill library designed to advance automated machine learning and auto-research. It distills over 5,000 executable skills from more than 1,000 popular GitHub repositories, making complex ML knowledge directly usable by coding agents. This project significantly enhances agent performance in various research tasks by providing structured, validated operating knowledge.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory
September 17, 2026
oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.
ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering
September 17, 2026
ASC is an innovative and exceptionally fast Android decompiler front-end, specifically designed for mobile researchers and agents. It redefines traditional decompilation by directly querying compiled artifacts, offering on-demand code extraction and analysis without heavy preprocessing. This approach results in significantly reduced memory usage and lightning-fast performance, even on large APKs.

Open Index: A Deterministic Memory Layer for Your AI Agents
September 16, 2026
Open Index is a powerful tool for building domain-specific, accurate, and structured data that AI agents can effectively operate on. It enables the creation of a "brain," a searchable and continuously improving context graph tailored to any domain. This system ensures agents have access to reliable, up-to-date information, enhancing their capabilities and decision-making processes.
Source repository
Open the original repository on GitHub.
17 counted GitHub visits