Skip to main content

Converts Python Mapping to namedtuple recursively

Project description

Convertor of Python Mappings to namedtuples

This project contains a function that converts a Python Mapping or dict to a namedtuple. The conversion works recursively and the input can contain other mappings or lists.

Usage

from mapping_to_namedtuple import mapping_to_named_tuple

mapping = {"a": "b", "c": "d", "e": [1, 2]}

namedtuple = mapping_to_named_tuple(mapping, "test_tuple")

Project details


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mapping-to-namedtuple, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size mapping_to_namedtuple-0.1-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mapping_to_namedtuple-0.1.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page