Lightweight wrapper for creating namedtuples.
Project description
Source: https://github.com/brennv/namedtupled
Docs: http://namedtupled.readthedocs.io/en/latest/
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.2.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for namedtupled-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e0900624b64b5ab1dd839a22ff2960b7a4e62e10aed28047443b192a934e03c |
|
MD5 | 86817be25fc14f7347069c44bf692501 |
|
BLAKE2b-256 | d88182a7299ff8d9850e585745a6fefa3570627d79914331831b06eaa2693616 |