Registry / serialization / data2objects

data2objects

JSON →
library0.1.0pypypi✓ verified 88d ago

A lightweight library for transforming nested dictionaries, JSON, or similar data structures into Python objects with attribute-style access. Current version 0.1.0, released in 2023. Release cadence is sporadic.

pip install data2objects
INSTALL
IMPORT
SIG · DATA2OBJECTS
D
data2objects
serializationpythonv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

from_dict
✓ from data2objects import from_dict
✗ from data2objects import from_data
from_yaml
✓ from data2objects import from_yaml
process_data
✓ from data2objects import process_data

Convert a nested dict into an object with dot-access.

from data2objects import from_data data = {'name': 'Alice', 'age': 30, 'address': {'city': 'Wonderland', 'zip': '12345'}} obj = from_data(data) print(obj.name) print(obj.address.city)
Debug
Known issues
gotchaKeys that are not valid Python identifiers (e.g., with spaces, starting with digits) will raise AttributeError when accessed as attributes.
fix
Use dictionary-style access (obj['key']) or sanitize keys before conversion.
affects: all
gotchaNested lists of dicts are not recursively converted; each dict remains a dict inside a list.
fix
Manually map list items with from_data if needed.
affects: 0.1.0
Upgrade
Version history
0.1.0latest on PyPI · released Dec 10, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
data2objects — pip install data2objects · libregistry