Skip to main content

Convert dictionaries to dataclasses and back

Project description


Python datatype marshalling

This libary marshalls dictionaries (think json) into instances of defined dataclasses and back.


from dataclasses import dataclass

import howard

class Person:
    name: str
    age: int

my_dict = {'name': 'Bob', 'age': 24}
person = howard.fromdict(my_dict, Person)
assert == 'Bob'
assert person.age == 24

to install:

pip install howard

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for howard, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size howard-1.2.0.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page