Box icon indicating copy to clipboard operation
Box copied to clipboard

Python dictionaries with advanced dot notation access

Results 51 Box issues
Sort by recently updated
recently updated
newest added

I have some nested Boxes using an overridden `__convert_and_store` in a subclass to convert values to an expected type (eg: I want all values to be an `int` or some...

enhancement

I have a YAML schema (see [here](https://github.com/calliope-project/calliope/blob/main/src/calliope/config/config_schema.yaml)) which I want to be able to get the flattened dict keys for - something that `Box` is well placed to provide with...

bug

When I load a Box from a YAML file, the floating-pont values are represented as a type from the ruamel YAML library, and not cast to the builtin `float` type....

bug

# Current If I have these two BoxDicts: ```python In [1]: from box import Box ...: dict1 = Box({'data': [{'foo': 1, 'foobar': 20}, {'bar': 2}] }, box_dots=True) ...: dict2 =...

enhancement

Is it correct? In [1]: from box import Box In [2]: test = Box(default_box=True) In [3]: test Out[3]: Box({'size': {'compute': {}}}) In [4]: test.keys() Out[4]: dict_keys(['size']) Python 3.11.6 Box 7.1.1

A common pattern for me is to subclass `Box` to get all of its features, but with a type custom to the application. Because box hard codes the types in...

I have a use case where I want to cache boxes and read them back again. Below is a MWE using `joblib` for caching but I also found it doesn't...

bug

I read #251 and think that using `is` operator to identify objects may fix the problem `id` brings. For now, you can: 1. initialize a `BoxList` with a list with...

VSCode has autocompletion of key names for regular dictionaries (only 1 level down unfortunately). I am not quite sure how that works, but could it somehow be extended to dot...

enhancement
help wanted

To reproduce: ``` >>> import box >>> box.__version__ '7.0.0' >>> box.Box({'a.b': 1}) Box({'a.b': 1}) >>> box.Box({'a.b': 1}, box_dots=True) Traceback (most recent call last): File "", line 1, in File "box/box.py",...

documentation