Skip to main content

A runtime type enforcer for dataclasses.

Project description

Runtime Dataclass Enforcer

from rtdce import enforce 

from dataclasses import dataclass
from typing import Dict

@dataclass
class Test:
    hello: Dict[str, int]

t = Test(hello={'world': 123})

enforce(t)

Project details


Download files

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

Source Distribution

rtdce-0.0.3.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

rtdce-0.0.3-py3-none-any.whl (14.6 kB view hashes)

Uploaded Python 3

Supported by

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