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 | RSS feed

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.

Source Distribution

mapping_to_namedtuple-0.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapping_to_namedtuple-0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file mapping_to_namedtuple-0.1.tar.gz.

File metadata

  • Download URL: mapping_to_namedtuple-0.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.6.7

File hashes

Hashes for mapping_to_namedtuple-0.1.tar.gz
Algorithm Hash digest
SHA256 7341d394c4b0cdb6494eb1dfb5964d48a2eb150e611686523f45ea0915d18bd1
MD5 3d69bd72e1ec1ec20513940296e0fee7
BLAKE2b-256 edc8edfb2b85e2fb037cd86e4a8b777cdca659e6ebdb40d07e2d98dbec6633bb

See more details on using hashes here.

File details

Details for the file mapping_to_namedtuple-0.1-py3-none-any.whl.

File metadata

  • Download URL: mapping_to_namedtuple-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.6.7

File hashes

Hashes for mapping_to_namedtuple-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a84d9fc07db82dc9ee69929da9b0e35408e0897497e1175e9ba6c20066ea18c
MD5 1a211697cf36a97d34a6a1e34585cbbb
BLAKE2b-256 1b5bdfdc0496325e9e41225d4df2177c28db00e17ad4c639fd24ae908f08242e

See more details on using hashes here.

Supported by

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