Skip to main content
https://travis-ci.org/jgirardet/dtc.svg?branch=master https://ci.appveyor.com/api/projects/status/ffd44ndqx713yuhd/branch/master?svg=true

DTC :”Generate Dataclasses without writting them !”

Basic Usage

>>> import dtc

>>> JSON = b"""{"flooat": 12.564, "boolean": true, "integer": 12}"""

>>> my_class = dtc.from_json(JSON)

>>> my_class
Base(flooat=12.564, boolean=True, integer=12)

>>> from dataclasses import *
>>> is_dataclass(my_class)
True

>>> JSON = b"""[{"flooat": 12.4, "boolean": true, "integer": 1}, {"flooat": 12.564, "boolean": true, "integer": 12},{"flooat": 1.4, "boolean": false, "integer": 0}]"""
>>> dtc.from_json(JSON
    [Base(flooat=12.4, boolean=True, integer=1), Base(flooat=12.564, boolean=True, integer=12), Base(flooat=1.4, boolean=False, integer=0)]

Release files for dtc 0.1.1

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

Source distribution (sdist)

Source distribution for dtc 0.1.1
File Size Uploaded
dtc-0.1.1.tar.gz 3.0 kB Details

Built distribution (wheel)

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

Total release size: 9.5 kB

Release files / dtc-0.1.1.tar.gz

Download URL dtc-0.1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9b8d7318ccc8e0ba1b1d0aaf8acb57fb2fe9f9e82e68334f25cd84d5ffe235c0
BLAKE2b-256 checksum
How to use checksums
4764950c05fd2b766db3217aec1f22b3453dbafe4ee389cf73c498bdccc3d4ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0a2 CPython/3.5.2 Linux/4.4.0-133-generic

Release files / dtc-0.1.1-py3-none-any.whl

Download URL dtc-0.1.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b5df7fe0eccf1e39053b3e030020a0ac5e19ad21be10e375eb72083bc5c5a12
BLAKE2b-256 checksum
How to use checksums
2716dc2d61163cec7266e3de771243b701fd8cb4e362b8742af5d3fede9ed607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0a2 CPython/3.5.2 Linux/4.4.0-133-generic

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.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