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.3.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for namedtupled-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12fef55413e99c861150ad497b6f6ff7971019af471095c5059b179c94ab6653 |
|
MD5 | 8f9680cccd84500553d365a6bd0b114e |
|
BLAKE2b-256 | 71bf09d954eda30d4bb77f6b43340cf9686ce0ce9e927b7fb1e72825d70bdbec |