Skip to main content

flexible, extensible python data structures

Project description

The goal of bunches is provide lightweight, turnkey, extensible data containers. bunches's framework supports a wide range of coding styles. You can create complex multiple inheritance structures with mixins galore or simpler, compositional objects.

The current classes available (as bunches.ContainerThatIWant) are: Listing: list-like class with 'add', 'prepend', and 'subset' methods. The 'add' method tries to intelligently decide whether the passed item(s) to add should be appended or extended on the stored list. Hybrid: list-like class that also has a full dict interface. Stored items must have a 'name' attribute or allow name inference via the 'get_name' function. Dictionary: dict-like class with 'add' and 'subset' methods. It also includes a 'default_factory' parameter providing the same functionality as a defaultdict. Catalog: dict-like class that allows lists of keys to be used for its various methods (including dunder access methods) and supports three wildcard keys: 'none', 'default', and 'all'. If lists of keys are passed or the 'default' and 'all' keys are used, a list of values is returned. Library: dict-like class that includes two chained dicts: 'instances' and 'classes'. Users can deposit classes and instances in a Library and they are stored and accessed intelligently. When instances are deposited, it is stored in 'instances' and its class is stored in 'classes'.

The project is also highly documented so that users and developers and make bunches work with their projects. It is designed for Python coders at all levels. Beginners should be able to follow the readable code and internal documentation to understand how it works. More advanced users should find complex and tricky problems addressed through efficient code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bunches-0.1.0.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

bunches-0.1.0-py3-none-any.whl (17.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page