Skip to main content

anodict: annotated dict

Pyversions

Convert a dict to an annotated object.

Usage

Installation

pip install anodict

Example

import anodict


class Person:
    name: str
    age: int

person = anodict.dict_to_class({
    "name": "bob",
    "age": 23
}, Person)

print("type:", type(person))
print("name:", person.name)
print("age:", person.age)

will give:

type: <class '__main__.Person'>
name: bob
age: 23

Release files for anodict 0.0.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 anodict 0.0.2
File Size Uploaded
anodict-0.0.2.tar.gz 3.1 kB Details

Built distribution (wheel)

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

Total release size: 6.8 kB

Release files / anodict-0.0.2.tar.gz

Download URL anodict-0.0.2.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
94760765010a6cf5a15a9127875f83bc83d9aacdfdec8e74ef128b1b17e39a92
BLAKE2b-256 checksum
How to use checksums
4835002887314d7ddde34aae916d444c992be6fd5bea8d90836ee377417d67b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

Release files / anodict-0.0.2-py3-none-any.whl

Download URL anodict-0.0.2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
394707e141b1d9a28a90f3ce68b6d6c8d28f01168e53a9726f68cb3d79060bd9
BLAKE2b-256 checksum
How to use checksums
9cdb5e7bb6e157eeb59b45961b48840555ecb8d2902904e233be42d0dcb9598c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

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