Lightweight wrapper for creating namedtuples.
Project description
https://github.com/brennv/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.2.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for namedtupled-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e91b9fd77fe29d43fea47ed8772e6aab96cfdd424458cccbe7a0f7b0ba521b9 |
|
MD5 | 61e5e88bfd325aa27403e9b6192bd452 |
|
BLAKE2b-256 | 763f1fe42ff645e13ae5bd5830aa70d78ee45cb360e1e67d1d7aa8a4cae402d1 |