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 | 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
Built Distribution
Close
Hashes for mapping_to_namedtuple-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7341d394c4b0cdb6494eb1dfb5964d48a2eb150e611686523f45ea0915d18bd1 |
|
MD5 | 3d69bd72e1ec1ec20513940296e0fee7 |
|
BLAKE2b-256 | edc8edfb2b85e2fb037cd86e4a8b777cdca659e6ebdb40d07e2d98dbec6633bb |
Close
Hashes for mapping_to_namedtuple-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a84d9fc07db82dc9ee69929da9b0e35408e0897497e1175e9ba6c20066ea18c |
|
MD5 | 1a211697cf36a97d34a6a1e34585cbbb |
|
BLAKE2b-256 | 1b5bdfdc0496325e9e41225d4df2177c28db00e17ad4c639fd24ae908f08242e |