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.

Tau: A Minimalist Python Coding Agent for Your Terminal
September 8, 2026
Tau is a Python port of Pi's minimalist coding agent, designed to live in your terminal. It allows users to make requests like "explain this repo" or "add tests," and it can read files, edit code, and run commands. Beyond its utility, Tau also serves as a teaching project, demonstrating how coding agents are built with a small, readable codebase.

Awesome Harness Engineering: Building Reliable AI Agent Systems
September 7, 2026
Awesome Harness Engineering is a comprehensive curated list dedicated to the discipline of designing robust AI agent harnesses. It offers a wealth of resources, patterns, and templates essential for building reliable AI agent systems. Developers can explore tools, best practices, and foundational concepts across various critical areas of agent development.
Best of Agent Harnesses: A Curated List for AI Agent Development
September 7, 2026
RyanAlberts' Best of Agent Harnesses is a comprehensive, curated, and ranked list of over 100 AI agent harnesses and orchestration frameworks. It provides valuable insights for building reliable agentic systems, offering both human-readable guides and machine-readable formats for agents themselves. The repository is rescored weekly to ensure up-to-date recommendations.

Wasm Agents Blueprint: Run Python AI Agents in Your Browser with WebAssembly
September 3, 2026
Wasm Agents Blueprint is an innovative project from Mozilla AI that allows you to run Python-based AI agents directly in your web browser using WebAssembly (Wasm) and Pyodide. It bridges the gap between powerful Python AI frameworks, like the OpenAI Agents SDK, and browser-based applications. This blueprint eliminates the need for complex server setups or Docker containers, offering a streamlined way to experience AI agents.
Source repository
Open the original repository on GitHub.
17 counted GitHub visits