Skip to main content

Introduction

The is a simplification and redesign of the orderedbunch package from tinytools. The package ontains an OrderedBunch object class with associated bunchify/unbunchify methods, similar to other bunch implementations but built off an OrderedDict with ipython table-complete overloaded to the data memebers. It removes the ordered_dictionarify function that is in tinytools and and leaves the development of the nested dictionaries to external code. The motivation is that it is quite complicated to infer what the user is wanting - and therefore error prone.

IPython has also recently changed its handling of the __dir__ method and it is unclear under which cases it is respected for tab completion or not. It seems, though, that for ipython 6, it is possible to remove mothods from the tab completion through the IPCompleter.* configuration options.

Installing

pip install orderedbunch

Import

import orderedbunch

Quick Start

from orderedbunch import OrderedBunch

## OrderedBunch
from collections import OrderedDict

# Create an OrderedBunch from and return it to an OrderedDict
od = OrderedDict({'a':1,'b':2,'c':{'aa':1.23,'bb':'string'}})
ob = orderedbunch.ordered_bunchify(od)
ob.a          # Explore the OrderdBunch with tab complete
ob['a']       # Equivalent to above
ob.c.bb       # orderd_bunchify is recursive on nested Dict objects
ob['c']['bb'] # Equivalent to above
od2 = tt.bunch.ordered_unbunchify(ob)

Metadata

Release files for orderedbunch 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orderedbunch 1.0.1
File Size Uploaded Provenance
orderedbunch-1.0.1.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for orderedbunch 1.0.1
File Interpreter ABI Platform
orderedbunch-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / orderedbunch-1.0.1.tar.gz

Download URL orderedbunch-1.0.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ab91052c1090133d7921637437179728290dd1539d4a89014a43d1231fc0b3d5
BLAKE2b-256 checksum
How to use checksums
2002bfcb94841649f8a714932d80d402d3efd3e4def999131c2053ac1b3ad215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release files / orderedbunch-1.0.1-py3-none-any.whl

Download URL orderedbunch-1.0.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8462a1e8f0a5b7717b1de7fd0c771fa383d99b8f2c14eb078cc1e3eb616bf0a5
BLAKE2b-256 checksum
How to use checksums
a9c72ffeb22306af652467995fef9d0b51c5908f54a7700b800a6b7343bc14e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Security for orderedbunch 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page