Discover Packages
github.com/dacolabs/cli
internal
translate
python
package
Version:
v0.3.1
Opens a new window with list of versions in this module.
Published: Mar 11, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
Python
Translates JSON Schema to Python dataclass definitions (.py).
Example
Input (JSON Schema):
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
}
}
Output (Python):
import dataclasses
from typing import Optional
@dataclasses.dataclass
class UsersSchema:
name: Optional[str] = None
age: Optional[int] = None
Supported JSON Schema Features
Type Keywords
Type Values
string
integer
number
boolean
array
object
null
Schema Composition
Object Keywords
properties
required
additionalProperties
patternProperties
propertyNames
minProperties / maxProperties
unevaluatedProperties
dependentRequired
Array Keywords
items
prefixItems
contains
minItems / maxItems
uniqueItems
unevaluatedItems
maxContains / minContains
Numeric Validation
minimum / maximum
exclusiveMinimum / exclusiveMaximum
multipleOf
String Validation
minLength / maxLength
pattern
References & Definitions
$ref
$defs
$id
$anchor
$dynamicRef / $dynamicAnchor
date
date-time
time
duration
uuid
uri / uri-reference / uri-template
iri / iri-reference
email / idn-email
hostname / idn-hostname
ipv4 / ipv6
json-pointer / relative-json-pointer
regex
Annotations
description
title
default
deprecated
readOnly / writeOnly
examples
Conditional
if / then / else
dependentSchemas
Content
contentEncoding
contentMediaType
contentSchema
Expand ▾
Collapse ▴
Documentation
¶
Package python provides Python dataclass schema translation utilities.
Translator translates JSON schemas to Python dataclass definitions.
FileExtension returns the file extension for Python files.
Translate converts a JSON schema to Python dataclass definitions.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.