Meta language for describing DSLs in JSON.


CallNode(id, function[, type_params, args, ...])

DeclaredType(type[, params])

DeclaredTypeInstance(type[, params])

ExternalType(type, repr)


Function(params, return_[, type_params, ...])


Dict that hashses to its key, value pairs.



PrimitiveNode(id, type, repr)

State(node, rule, logs[, label])

States(initial[, states])


Typez([definitions, nodes, states])


A display object for typez objects.

class typez.CallNode(id, function, type_params=None, args=None, kwargs=None)[source]
args: Optional[List[str]] = None
function: str
id: str
kwargs: Optional[Dict[str, str]] = None
type_params: Optional[Dict[str, Union[DeclaredTypeInstance, ExternalTypeInstance]]] = None
class typez.DeclaredType(type, params=None)[source]
params: Optional[Dict[str, Union[TypeParameter, DeclaredType, ExternalType]]] = None
type: str
class typez.DeclaredTypeInstance(type, params=None)[source]
params: Optional[Dict[str, Union[DeclaredTypeInstance, ExternalTypeInstance]]] = None
type: str
class typez.ExternalType(type, repr)[source]
repr: str
type: str
class typez.ExternalTypeInstance(repr)[source]
repr: str
class typez.Function(params, return_, type_params=None, rest_param=None)[source]
params: List[Tuple[str, Union[TypeParameter, DeclaredType, ExternalType]]]
rest_param: Optional[Tuple[str, Union[TypeParameter, DeclaredType, ExternalType]]] = None
return_: Union[TypeParameter, DeclaredType, ExternalType]
type_params: Optional[List[str]] = None
class typez.Kind(params=None)[source]
params: Optional[List[str]] = None
class typez.PrimitiveNode(id, type, repr)[source]
id: str
repr: str
type: str
class typez.State(node, rule, logs, label=None)[source]
label: Optional[str] = None
logs: str
node: str
rule: str
class typez.States(initial, states=None)[source]
initial: str
states: Optional[List[State]] = None
class typez.TypeParameter(param)[source]
param: str
class typez.Typez(definitions=None, nodes=None, states=None)[source]

Turns this into a dict, removing keys with null values and validating it against the schema.

definitions: Optional[Dict[str, Union[Kind, Function]]] = None
nodes: Optional[List[Union[CallNode, PrimitiveNode]]] = None
states: Optional[typez.States] = None
class typez.TypezDisplay(typez=<property object>)[source]

A display object for typez objects. If you set the typez property after calling display it will update the existing display.

property typez