Registry / serialization / super-collections

super-collections

JSON →
library0.6.2pypypi✓ verified 24d ago

Super Collections is a Python library (current version 0.6.2) that provides enhanced data structures, `SuperList` and `SuperDict`, which are designed for deeply nested data, similar to JSON or YAML structures. It offers features like recursive conversion of Python data structures, convenient dot-based access to nested elements, and a `super_collect()` factory function for easy instantiation. The library aims to simplify working with complex, nested collections and is actively maintained.

pip install super-collections
INSTALL
IMPORT
SIG · SUPER-COLLECTIONS
S
super-collections
serializationpythonv0.6.2
Install
1.7s avg
Import
62ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.062s · 18.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.062s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

super_collect
from super_collections import super_collect
Use the factory function to create SuperList or SuperDict instances from existing data.
SuperList
from super_collections import SuperList
Represents an enhanced list supporting nested SuperCollections and dot access.
SuperDict
from super_collections import SuperDict
Represents an enhanced dictionary supporting nested SuperCollections and dot access.
SuperCollection
from super_collections import SuperCollection
from super_collections import SuperCollection; instance = SuperCollection()
SuperCollection is an abstract base class; it cannot be directly instantiated. SuperList and SuperDict are concrete implementations.

This quickstart demonstrates how to create `SuperDict` and `SuperList` instances using the `super_collect` factory function and access nested data using convenient dot notation.

from super_collections import super_collect, SuperList, SuperDict # Create a SuperDict from a regular Python dictionary data = {'user': {'name': 'Alice', 'details': {'age': 30, 'city': 'NY'}} } sd = super_collect(data) # Access nested elements using dot notation print(f"User name: {sd.user.name}") print(f"User city: {sd.user.details.city}") # Create a SuperList from a regular Python list items = [1, {'product': 'Laptop', 'price': 1200}, 3] sl = super_collect(items) # Access elements in a SuperList print(f"First item: {sl[0]}") print(f"Product name: {sl[1].product}") # Modify elements sd.user.details.age = 31 print(f"Updated age: {sd.user.details.age}")
Debug
Known issues
gotchaThe `SuperCollection` class is an abstract base class and cannot be instantiated directly. `SuperList` and `SuperDict` are the concrete, instantiable collection types that are instances of `SuperCollection`.
fix
Always use `SuperList()`, `SuperDict()`, or the `super_collect()` factory function to create collection instances.
affects: All versions
gotchaThe `super_collect()` factory function performs recursive conversion of Python lists and dictionaries into `SuperList` and `SuperDict` instances. This might implicitly change the type of nested standard Python collections, which could be unexpected if strict preservation of original container types (e.g., `list` instead of `SuperList`) is critical for certain custom objects or behaviors.
fix
Be aware that inputs passed to `super_collect()` will be deeply converted. If specific nested types must be preserved, consider manual construction or shallow copying where appropriate.
affects: All versions
gotchaWhen using dot notation (e.g., `my_superdict.non_existent_key`) for accessing elements, attempting to access a non-existent key will raise an `AttributeError`, not a `KeyError` as with standard Python dictionaries. This distinction is important for error handling.
fix
Use `try-except AttributeError` for gracefully handling missing keys when using dot notation, or check for key existence (e.g., `if 'key' in my_superdict:`) before access.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'supercollections'
The developer attempted to import the library using an incorrect module name (e.g., 'supercollections' or 'super-collections') instead of the correct `super_collections`.
fix
Use the correct module name with an underscore for import: `from super_collections import SuperList, SuperDict, super_collect`
AttributeError: 'SuperDict' object has no attribute 'non_existent_key'
The developer tried to access a key using dot notation (`.non_existent_key`) that does not exist in the `SuperDict` instance.
fix
Verify the key name, use the `get()` method with a default value to handle missing keys, or check for key existence using the `in` operator. Example: `value = my_dict.get('non_existent_key', default_value)`
AttributeError: 'SuperList' object has no attribute 'item_property'
The developer attempted to use dot notation to access properties on an element within a `SuperDict` or `SuperList` that is not itself a `SuperDict` (e.g., trying to access 'item_property' directly on a `SuperList` object or a standard Python object within it). Dot access is primarily for navigating nested dictionary-like structures.
fix
Use standard Python indexing (e.g., `[0]`) for `SuperList` elements, or access attributes/methods appropriate for the actual object type. Example: `data.my_list[0].attribute_name`
Upgrade
Version history
0.6.2latest on PyPI · released Sep 30, 2025
Audit
Dependencies
pythonrequiredRequires Python 3.8 or newer.
hjsonrequiredRequired for Hjson parsing capabilities.
Agent activity
17 hits · last 30 days
node
12
OpenAI (training)
1
Resources
super-collections — pip install super-collections · libregistry