Lightweight wrapper for creating namedtuples.
Project description
https://github.com/brennv/namedtupled
namedtupled
namedtuples are immutable, performant and classy. namedtupled is a lightweight wrapper for recursively creating namedtuples from nested dicts, lists, json and yaml. Thanks to 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.1.4.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for namedtupled-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64fb0d4f3410bf1813dccf89f4d6c0decbe2fd1df9c3d2a7f07f581d679c06db |
|
MD5 | b20f4dc8fe41ac252257d948c35ae1a7 |
|
BLAKE2b-256 | 30193f8c975ea61d932a5e94b96d23d48644343fd23d5e5c81ef0e7f7aa22082 |