Lightweight namedtuple wrapper for attribute-style data access (a la JavaScript objects).
Project description
Source: https://github.com/brennv/namedtupled
Docs: https://namedtupled.readthedocs.io
namedtuples are immutable, performant and classy. namedtupled is a lightweight wrapper for recursively creating namedtuples from nested dicts, lists, json and yaml. Inspired by hangtwenty.
Installation
pip install namedtupled
Getting started
import namedtupled
data = {'binks': {'says': 'meow'}}
cat = namedtupled.map(data)
cat # NT(binks=NT(says='meow'))
cat.binks.says # 'meow'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
namedtupled-0.3.3.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for namedtupled-0.3.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e168b155672987fc7ae367d8833120deb86ed6766da1442f68ca06617cd7b07a |
|
MD5 | 735bf5f475934dbb66670dcf9f414db7 |
|
BLAKE2b-256 | b9efddec4c396dd9902d54e385ba5a2a984df836f9efacc41f372998c59d1340 |