Skip to main content

mclass: convert python dict to python class object

PyPI Latest Release

What is it?

mclass It fully converts a python dict to a python class object and all dict keys and internal dict are converted to python class objects as well.

# !pip install mclass

Example

from mclass import DictClass
import pandas as pd
import numpy as np
obj = DictClass({'id':1, 'data':{'name':'John', 'age':31, 'wife':{'name':'Jessica', 'age':np.nan}}})

print(obj.id, obj.data.name, obj.data.wife.name)
1 John Jessica
obj
{'id': 1, 'data': {'name': 'John', 'age': 31, 'wife': {'name': 'Jessica', 'age': nan}}}

Metadata

Release files for mclass 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mclass 1.3.4
File Size Uploaded Provenance Actions
mclass-1.3.4.tar.gz 2.2 kB Without provenance Details for mclass-1.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mclass 1.3.4
File Interpreter ABI Platform Actions
mclass-1.3.4-py3-none-any.whl Python 3 none any Details for mclass-1.3.4-py3-none-any.whl

Total release size: 4.7 kB

Release files / mclass-1.3.4.tar.gz

Download URL mclass-1.3.4.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
414f786287b80a80261125fc9ed844dbf9093907e96999a2f0391a7b32a1cb60
BLAKE2b-256 checksum
How to use checksums
1ac1bcef375ab907942b67f81e80ed0df76e8cb19c155de3d52181ea17c3c707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / mclass-1.3.4-py3-none-any.whl

Download URL mclass-1.3.4-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1382b4e93d2c1f6cbf88174643a7822e8877dab70f69cfd1044de7ea1f2fca52
BLAKE2b-256 checksum
How to use checksums
de55f0aa8725040bd019557bb6c6821310f4ae0183ff9c9db1981e98ef6b18e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for mclass 1.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page