Box: Python Dictionaries with Advanced Dot Notation Access

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Box: Python Dictionaries with Advanced Dot Notation Access

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

Analyzed by OSRepos on December 4, 2025

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 Box and BoxList objects, 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

Related repositories

Similar repositories that may be relevant next.

Mergoo: Efficiently Merge and Train Multiple LLM Experts

Mergoo: Efficiently Merge and Train Multiple LLM Experts

July 7, 2026

Mergoo is an open-source Python library designed to simplify the merging of multiple Large Language Model (LLM) experts. It enables efficient training of these merged LLMs, allowing users to integrate knowledge from various generic or domain-specific models. The library supports several merging methods, including Mixture-of-Experts and Mixture-of-Adapters, across popular base models.

artificial-intelligencefine-tuninggenerative-ai
Ludwig: Low-Code Declarative Deep Learning for LLMs and AI Models

Ludwig: Low-Code Declarative Deep Learning for LLMs and AI Models

July 6, 2026

Ludwig is a powerful, low-code declarative deep learning framework designed for building custom LLMs, neural networks, and other AI models. It simplifies the process of training, fine-tuning, and deploying models, from LLM fine-tuning to tabular classification, using a simple YAML configuration without boilerplate Python code. This makes advanced AI development accessible and efficient for a wide range of applications.

PythonAI FrameworkDeep Learning
Lamini: The Official Python Client for Generative AI API

Lamini: The Official Python Client for Generative AI API

July 6, 2026

Lamini is the official Python client and SDK designed to interact with the Lamini API, enabling developers to create their own Generative AI applications. It provides a straightforward interface for integrating powerful AI capabilities into Python projects. This package simplifies the process of building and deploying generative AI solutions.

PythonAIGenerative AI
xTuring: Build, Personalize, and Control Your Own LLMs

xTuring: Build, Personalize, and Control Your Own LLMs

July 6, 2026

xTuring is an open-source framework designed to simplify the process of building, personalizing, and controlling Large Language Models (LLMs). It provides an easy way to fine-tune open-source LLMs on your own data, offering features from data pre-processing to efficient training and inference. This tool empowers developers to create private, personalized LLMs locally or in their private cloud environments.

PythonLLMFine-tuning

Source repository

Open the original repository on GitHub.

6 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️