Skip to main content

Lightweight namedtuple wrapper for attribute-style data access (a la JavaScript objects).

Project description

https://travis-ci.org/brennv/namedtupled.svg?branch=master https://img.shields.io/badge/python-2.7%2C%203.4%2C%203.5-blue.svg https://img.shields.io/codecov/c/github/brennv/namedtupled.svg

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


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)

Uploaded Source

Built Distribution

namedtupled-0.3.3-py2.py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page