fabricatio 0.5.0.dev0__cp312-cp312-manylinux_2_34_x86_64.whl → 0.5.1.dev0__cp312-cp312-manylinux_2_34_x86_64.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.
- fabricatio/actions/__init__.py +5 -0
- {fabricatio-0.5.0.dev0.dist-info → fabricatio-0.5.1.dev0.dist-info}/METADATA +13 -16
- {fabricatio-0.5.0.dev0.dist-info → fabricatio-0.5.1.dev0.dist-info}/RECORD +6 -6
- {fabricatio-0.5.0.dev0.data → fabricatio-0.5.1.dev0.data}/scripts/tdown +0 -0
- {fabricatio-0.5.0.dev0.dist-info → fabricatio-0.5.1.dev0.dist-info}/WHEEL +0 -0
- {fabricatio-0.5.0.dev0.dist-info → fabricatio-0.5.1.dev0.dist-info}/licenses/LICENSE +0 -0
fabricatio/actions/__init__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.1.dev0
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
5
5
|
Classifier: Programming Language :: Rust
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -119,35 +119,32 @@ make bdist
|
|
119
119
|
### Basic Example
|
120
120
|
|
121
121
|
```python
|
122
|
-
|
123
|
-
|
122
|
+
"""Example of a simple hello world program using fabricatio."""
|
123
|
+
|
124
124
|
from typing import Any
|
125
125
|
|
126
|
+
from fabricatio import Action, Event, Role, Task, WorkFlow, logger
|
127
|
+
|
126
128
|
|
127
129
|
class Hello(Action):
|
128
|
-
|
130
|
+
"""Action that says hello."""
|
131
|
+
|
129
132
|
output_key: str = "task_output"
|
130
133
|
|
131
|
-
async def _execute(self,
|
134
|
+
async def _execute(self, **_) -> Any:
|
132
135
|
ret = "Hello fabricatio!"
|
133
136
|
logger.info("executing talk action")
|
134
137
|
return ret
|
135
138
|
|
139
|
+
"""Main function."""
|
136
140
|
|
137
|
-
async def main() -> None:
|
138
|
-
Role(
|
139
|
-
name="talker",
|
140
|
-
description="talker role",
|
141
|
-
registry={Event.quick_instantiate("talk"): WorkFlow(name="talk", steps=(Hello,))}
|
142
|
-
)
|
143
141
|
|
144
|
-
|
145
|
-
|
146
|
-
|
142
|
+
(Role()
|
143
|
+
.register_workflow(Event.quick_instantiate("talk"), WorkFlow(name="talk", steps=(Hello,)))
|
144
|
+
.dispatch())
|
147
145
|
|
146
|
+
assert Task(name="say hello").delegate_blocking("talk") == "Hello fabricatio!"
|
148
147
|
|
149
|
-
if __name__ == "__main__":
|
150
|
-
asyncio.run(main())
|
151
148
|
```
|
152
149
|
|
153
150
|
### Examples
|
@@ -1,9 +1,9 @@
|
|
1
|
-
fabricatio-0.5.
|
2
|
-
fabricatio-0.5.
|
3
|
-
fabricatio-0.5.
|
4
|
-
fabricatio-0.5.
|
1
|
+
fabricatio-0.5.1.dev0.data/scripts/tdown,sha256=aQF9qrdNEftHmIId3K0WUxdAx-THEoUsq36qe0q29JE,5130216
|
2
|
+
fabricatio-0.5.1.dev0.dist-info/METADATA,sha256=h6yAqsSjJFGPqbX3MLNhnv6P9Tp4ouDU1wM0UepaK3E,7287
|
3
|
+
fabricatio-0.5.1.dev0.dist-info/WHEEL,sha256=MegmbKpmfItx05_jJ5VsxUKelo4nKw5OVeAu8XxdjGw,108
|
4
|
+
fabricatio-0.5.1.dev0.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
|
5
5
|
fabricatio/__init__.py,sha256=RuDz5JHlGrYWvMm9H08prJxhwVQFr6-SpKWA3FB9JWg,694
|
6
|
-
fabricatio/actions/__init__.py,sha256=
|
6
|
+
fabricatio/actions/__init__.py,sha256=4xR1wiPq2HPnVABXy6R3wOxcg9LZKD7g-h9IdTcNKvY,2106
|
7
7
|
fabricatio/capabilities/__init__.py,sha256=jFjEAlWYJcl60_hGogmT8s9RClil5xK-YiGgnk9xeh4,2090
|
8
8
|
fabricatio/models/__init__.py,sha256=bbfRfQhqXcgDXtGQOW2hGgVViOC_wOWylhy9kTQ4OwA,1551
|
9
9
|
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -12,4 +12,4 @@ fabricatio/toolboxes/__init__.py,sha256=_Snn7bB7pBsRYNgqzBzVL8jgka0FdgK6Lme8UnDs
|
|
12
12
|
fabricatio/toolboxes/arithmetic.py,sha256=kiX83WRfFyqNavpz9Wd0fPxa2HQbi_VTMRNp4B8ErNQ,1312
|
13
13
|
fabricatio/toolboxes/fs.py,sha256=lipQP6I8HR08ujucsbMR_qBHxlLzMu4O38qPFitZtHc,715
|
14
14
|
fabricatio/workflows/__init__.py,sha256=sr-0tgpNPdN5t2pDQa-gp-KUE7K0QDtjP9QGvWYLZ9A,305
|
15
|
-
fabricatio-0.5.
|
15
|
+
fabricatio-0.5.1.dev0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|