Skip to main content

DictToObject

DictToObject is a Python utility class that converts dictionaries into objects, allowing you to access keys as attributes.

Installation

Install using pip:

pip install dicttoobject

Dependencies

  • termcolor: python

Example

  1. Import the DictToObject class:
from dicttoobject import DictToObject
  1. Create a dictionary:
data = {
    'name': 'John Doe',
    'age': 30,
    'address': {
        'street': '123 Main St',
        'city': 'New York'
    }
}
  1. Convert the dictionary into an object:
obj = DictToObject(data)

# Accessing attributes
print(obj.name)  # Output: John Doe
print(obj.age)  # Output: 30

Metadata

Release files for dtob 1.1.2

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

Source distribution (sdist)

Source distribution for dtob 1.1.2
File Size Uploaded
dtob-1.1.2.tar.gz 1.8 kB Details

Built distribution (wheel)

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

Total release size: 3.6 kB

Release files / dtob-1.1.2.tar.gz

Download URL dtob-1.1.2.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
108b40f92813a6a5963dfefa03df3221f3c6c363c23e4cd072d2f13df1a796c2
BLAKE2b-256 checksum
How to use checksums
19e8f4015f0de7c3d4a859c4486e3ac1914a9a8180afaa6595bff81ee7c00837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / dtob-1.1.2-py3-none-any.whl

Download URL dtob-1.1.2-py3-none-any.whl
Size 1.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52b459507f025da1c8dbbc82374cdee9d9a96ec97ce5f764b361e74cd14d2dc4
BLAKE2b-256 checksum
How to use checksums
43f7567986f1670a15f88f500d3fe991282929759c393721b4690df345bacb83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

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