dryv-author 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dryv_author/__init__.py +184 -0
- dryv_author/_version.py +6 -0
- dryv_author/behavior.py +613 -0
- dryv_author/composition.py +504 -0
- dryv_author/core.py +270 -0
- dryv_author/expressions.py +198 -0
- dryv_author/interaction.py +313 -0
- dryv_author/orchestration.py +216 -0
- dryv_author/properties.py +951 -0
- dryv_author/schemas.py +631 -0
- dryv_author/state.py +1253 -0
- dryv_author-0.0.1.dist-info/METADATA +66 -0
- dryv_author-0.0.1.dist-info/RECORD +14 -0
- dryv_author-0.0.1.dist-info/WHEEL +4 -0
dryv_author/__init__.py
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"""Dryv Python Author SDK.
|
|
2
|
+
|
|
3
|
+
Declare software meaning in Python; the matching ``dryv-compiler`` lowers it to canonical
|
|
4
|
+
Runtime IR. The API mirrors the TypeScript author with Pythonic names::
|
|
5
|
+
|
|
6
|
+
from dryv_author import dryv, field, operation, prop, schema
|
|
7
|
+
|
|
8
|
+
users = dryv.group("users")
|
|
9
|
+
accounts = users.feature("Accounts")
|
|
10
|
+
ids = accounts.properties({"Id": prop.string.uuid()})
|
|
11
|
+
models = accounts.schemas({"User": schema({"id": field(ids.Id).system()})})
|
|
12
|
+
app = dryv.app("example").groups(users)
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from ._version import AUTHOR_REPRESENTATION_VERSION, AUTHOR_VERSION, __version__
|
|
16
|
+
from .behavior import (
|
|
17
|
+
EventDeclaration,
|
|
18
|
+
FailureDeclaration,
|
|
19
|
+
HttpFacet,
|
|
20
|
+
OperationDeclaration,
|
|
21
|
+
PolicyDeclaration,
|
|
22
|
+
ScheduleFacet,
|
|
23
|
+
WebSocketFacet,
|
|
24
|
+
body,
|
|
25
|
+
bytes_,
|
|
26
|
+
cookie,
|
|
27
|
+
csv,
|
|
28
|
+
daily,
|
|
29
|
+
event,
|
|
30
|
+
event_stream,
|
|
31
|
+
failure,
|
|
32
|
+
form,
|
|
33
|
+
header,
|
|
34
|
+
hours,
|
|
35
|
+
http,
|
|
36
|
+
interval,
|
|
37
|
+
json,
|
|
38
|
+
minutes,
|
|
39
|
+
multipart,
|
|
40
|
+
operation,
|
|
41
|
+
path,
|
|
42
|
+
policy,
|
|
43
|
+
port,
|
|
44
|
+
query,
|
|
45
|
+
query_object,
|
|
46
|
+
representation,
|
|
47
|
+
respond,
|
|
48
|
+
schedule,
|
|
49
|
+
seconds,
|
|
50
|
+
text,
|
|
51
|
+
websocket,
|
|
52
|
+
xml,
|
|
53
|
+
)
|
|
54
|
+
from .composition import (
|
|
55
|
+
AppDeclaration,
|
|
56
|
+
ApplicationDeclaration,
|
|
57
|
+
FeatureDeclaration,
|
|
58
|
+
GroupDeclaration,
|
|
59
|
+
application,
|
|
60
|
+
dryv,
|
|
61
|
+
feature,
|
|
62
|
+
is_dryv_app,
|
|
63
|
+
)
|
|
64
|
+
from .core import AuthoringError, OperationRef, Ref, Refs, SchemaRef, ViewRef, WorkflowRef
|
|
65
|
+
from .expressions import ExpressionDeclaration, context, duration, expression, value
|
|
66
|
+
from .interaction import (
|
|
67
|
+
SurfaceDeclaration,
|
|
68
|
+
ViewDeclaration,
|
|
69
|
+
input_from,
|
|
70
|
+
output_from,
|
|
71
|
+
part,
|
|
72
|
+
surface,
|
|
73
|
+
view,
|
|
74
|
+
)
|
|
75
|
+
from .orchestration import (
|
|
76
|
+
WorkflowDeclaration,
|
|
77
|
+
operation_step,
|
|
78
|
+
wait_for,
|
|
79
|
+
workflow,
|
|
80
|
+
workflow_step,
|
|
81
|
+
)
|
|
82
|
+
from .properties import TypeParameter, enum_member, prop
|
|
83
|
+
from .schemas import (
|
|
84
|
+
FieldSpec,
|
|
85
|
+
SchemaDeclaration,
|
|
86
|
+
dynamic,
|
|
87
|
+
field,
|
|
88
|
+
projection,
|
|
89
|
+
relation,
|
|
90
|
+
schema,
|
|
91
|
+
source,
|
|
92
|
+
storage,
|
|
93
|
+
unknown,
|
|
94
|
+
)
|
|
95
|
+
from .state import AuthorState, StringFormat
|
|
96
|
+
|
|
97
|
+
__all__ = [
|
|
98
|
+
"AUTHOR_REPRESENTATION_VERSION",
|
|
99
|
+
"AUTHOR_VERSION",
|
|
100
|
+
"AppDeclaration",
|
|
101
|
+
"ApplicationDeclaration",
|
|
102
|
+
"AuthorState",
|
|
103
|
+
"AuthoringError",
|
|
104
|
+
"EventDeclaration",
|
|
105
|
+
"ExpressionDeclaration",
|
|
106
|
+
"FailureDeclaration",
|
|
107
|
+
"FeatureDeclaration",
|
|
108
|
+
"FieldSpec",
|
|
109
|
+
"GroupDeclaration",
|
|
110
|
+
"HttpFacet",
|
|
111
|
+
"OperationDeclaration",
|
|
112
|
+
"OperationRef",
|
|
113
|
+
"PolicyDeclaration",
|
|
114
|
+
"Ref",
|
|
115
|
+
"Refs",
|
|
116
|
+
"ScheduleFacet",
|
|
117
|
+
"SchemaDeclaration",
|
|
118
|
+
"SchemaRef",
|
|
119
|
+
"StringFormat",
|
|
120
|
+
"SurfaceDeclaration",
|
|
121
|
+
"TypeParameter",
|
|
122
|
+
"ViewDeclaration",
|
|
123
|
+
"ViewRef",
|
|
124
|
+
"WebSocketFacet",
|
|
125
|
+
"WorkflowDeclaration",
|
|
126
|
+
"WorkflowRef",
|
|
127
|
+
"__version__",
|
|
128
|
+
"application",
|
|
129
|
+
"body",
|
|
130
|
+
"bytes_",
|
|
131
|
+
"context",
|
|
132
|
+
"cookie",
|
|
133
|
+
"csv",
|
|
134
|
+
"daily",
|
|
135
|
+
"dryv",
|
|
136
|
+
"duration",
|
|
137
|
+
"dynamic",
|
|
138
|
+
"enum_member",
|
|
139
|
+
"event",
|
|
140
|
+
"event_stream",
|
|
141
|
+
"expression",
|
|
142
|
+
"failure",
|
|
143
|
+
"feature",
|
|
144
|
+
"field",
|
|
145
|
+
"form",
|
|
146
|
+
"header",
|
|
147
|
+
"hours",
|
|
148
|
+
"http",
|
|
149
|
+
"input_from",
|
|
150
|
+
"interval",
|
|
151
|
+
"is_dryv_app",
|
|
152
|
+
"json",
|
|
153
|
+
"minutes",
|
|
154
|
+
"multipart",
|
|
155
|
+
"operation",
|
|
156
|
+
"operation_step",
|
|
157
|
+
"output_from",
|
|
158
|
+
"part",
|
|
159
|
+
"path",
|
|
160
|
+
"policy",
|
|
161
|
+
"port",
|
|
162
|
+
"projection",
|
|
163
|
+
"prop",
|
|
164
|
+
"query",
|
|
165
|
+
"query_object",
|
|
166
|
+
"relation",
|
|
167
|
+
"representation",
|
|
168
|
+
"respond",
|
|
169
|
+
"schedule",
|
|
170
|
+
"schema",
|
|
171
|
+
"seconds",
|
|
172
|
+
"source",
|
|
173
|
+
"storage",
|
|
174
|
+
"surface",
|
|
175
|
+
"text",
|
|
176
|
+
"unknown",
|
|
177
|
+
"value",
|
|
178
|
+
"view",
|
|
179
|
+
"wait_for",
|
|
180
|
+
"websocket",
|
|
181
|
+
"workflow",
|
|
182
|
+
"workflow_step",
|
|
183
|
+
"xml",
|
|
184
|
+
]
|