vibeblocks 0.1.0__tar.gz
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.
- vibeblocks-0.1.0/.gitignore +139 -0
- vibeblocks-0.1.0/CHANGELOG.md +14 -0
- vibeblocks-0.1.0/LICENSE +21 -0
- vibeblocks-0.1.0/PKG-INFO +176 -0
- vibeblocks-0.1.0/README.md +99 -0
- vibeblocks-0.1.0/pyproject.toml +104 -0
- vibeblocks-0.1.0/src/vibeblocks/__init__.py +22 -0
- vibeblocks-0.1.0/src/vibeblocks/components/__init__.py +0 -0
- vibeblocks-0.1.0/src/vibeblocks/components/block.py +195 -0
- vibeblocks-0.1.0/src/vibeblocks/components/chain.py +124 -0
- vibeblocks-0.1.0/src/vibeblocks/components/flow.py +278 -0
- vibeblocks-0.1.0/src/vibeblocks/core/__init__.py +0 -0
- vibeblocks-0.1.0/src/vibeblocks/core/context.py +163 -0
- vibeblocks-0.1.0/src/vibeblocks/core/decorators.py +70 -0
- vibeblocks-0.1.0/src/vibeblocks/core/errors.py +18 -0
- vibeblocks-0.1.0/src/vibeblocks/core/executable.py +40 -0
- vibeblocks-0.1.0/src/vibeblocks/core/outcome.py +14 -0
- vibeblocks-0.1.0/src/vibeblocks/policies/__init__.py +0 -0
- vibeblocks-0.1.0/src/vibeblocks/policies/failure.py +14 -0
- vibeblocks-0.1.0/src/vibeblocks/policies/retry.py +101 -0
- vibeblocks-0.1.0/src/vibeblocks/py.typed +0 -0
- vibeblocks-0.1.0/src/vibeblocks/runtime/__init__.py +0 -0
- vibeblocks-0.1.0/src/vibeblocks/runtime/runner.py +51 -0
- vibeblocks-0.1.0/src/vibeblocks/utils/__init__.py +2 -0
- vibeblocks-0.1.0/src/vibeblocks/utils/execution.py +33 -0
- vibeblocks-0.1.0/src/vibeblocks/utils/inspection.py +33 -0
- vibeblocks-0.1.0/src/vibeblocks/utils/schema.py +121 -0
- vibeblocks-0.1.0/src/vibeblocks/utils/serialization.py +34 -0
- vibeblocks-0.1.0/src/vibeblocks/vibeblocks.py +66 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
**/__pycache__/**
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# with no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celeryblock-schedule
|
|
99
|
+
celeryblock.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# pytype static type analyzer
|
|
132
|
+
.pytype/
|
|
133
|
+
|
|
134
|
+
# Cython debug symbols
|
|
135
|
+
cython_debug/
|
|
136
|
+
|
|
137
|
+
# IDE
|
|
138
|
+
.idea/
|
|
139
|
+
.vscode/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-02-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Initial public deployment of VibeBlocks.
|
|
9
|
+
- Core components: `Block`, `Chain`, `Flow`, `ExecutionContext`.
|
|
10
|
+
- Resilience policies: `RetryPolicy`, `FailureStrategy`.
|
|
11
|
+
- Runtime runners: `SyncRunner`, `AsyncRunner`.
|
|
12
|
+
- Dynamic execution support through `VibeBlocks.run_from_json`.
|
|
13
|
+
- Documentation and initial project structure.
|
|
14
|
+
- `py.typed` marker for type checking support.
|
vibeblocks-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Alejandro Avendaño
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vibeblocks
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Lightweight Python workflow orchestration library for AI agents, async task execution, retries, and failure-safe automation.
|
|
5
|
+
Project-URL: Homepage, https://github.com/AADigitalBusiness/vibeblocks
|
|
6
|
+
Project-URL: Documentation, https://github.com/AADigitalBusiness/vibeblocks#readme
|
|
7
|
+
Project-URL: Issues, https://github.com/AADigitalBusiness/vibeblocks/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/AADigitalBusiness/vibeblocks
|
|
9
|
+
Project-URL: Source, https://github.com/AADigitalBusiness/vibeblocks
|
|
10
|
+
Project-URL: Changelog, https://github.com/AADigitalBusiness/vibeblocks/blob/main/CHANGELOG.md
|
|
11
|
+
Author-email: Alejandro Avendaño <aavendano79@gmail.com>
|
|
12
|
+
Maintainer-email: AADigitalBusiness <admin@aadigitalbusiness.com>
|
|
13
|
+
License: MIT License
|
|
14
|
+
|
|
15
|
+
Copyright (c) 2024 Alejandro Avendaño
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
SOFTWARE.
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Keywords: ai agents,async workflows,failure recovery,llm orchestration,python automation,retry logic,task execution,workflow orchestration
|
|
36
|
+
Classifier: Development Status :: 4 - Beta
|
|
37
|
+
Classifier: Framework :: AsyncIO
|
|
38
|
+
Classifier: Intended Audience :: Developers
|
|
39
|
+
Classifier: Intended Audience :: Information Technology
|
|
40
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
41
|
+
Classifier: Operating System :: OS Independent
|
|
42
|
+
Classifier: Programming Language :: Python
|
|
43
|
+
Classifier: Programming Language :: Python :: 3
|
|
44
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
50
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
51
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
52
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
53
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
54
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
55
|
+
Classifier: Typing :: Typed
|
|
56
|
+
Requires-Python: >=3.8
|
|
57
|
+
Provides-Extra: dev
|
|
58
|
+
Requires-Dist: build; extra == 'dev'
|
|
59
|
+
Requires-Dist: hatchling; extra == 'dev'
|
|
60
|
+
Requires-Dist: myst-parser; extra == 'dev'
|
|
61
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
62
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
63
|
+
Requires-Dist: sphinx; extra == 'dev'
|
|
64
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
|
|
65
|
+
Requires-Dist: twine; extra == 'dev'
|
|
66
|
+
Provides-Extra: docs
|
|
67
|
+
Requires-Dist: myst-parser; extra == 'docs'
|
|
68
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
69
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
70
|
+
Provides-Extra: release
|
|
71
|
+
Requires-Dist: build; extra == 'release'
|
|
72
|
+
Requires-Dist: hatchling; extra == 'release'
|
|
73
|
+
Requires-Dist: twine; extra == 'release'
|
|
74
|
+
Provides-Extra: test
|
|
75
|
+
Requires-Dist: pytest; extra == 'test'
|
|
76
|
+
Description-Content-Type: text/markdown
|
|
77
|
+
|
|
78
|
+
# VibeBlocks
|
|
79
|
+
|
|
80
|
+
**AI-First Orchestration for Python.**
|
|
81
|
+
|
|
82
|
+
VibeBlocks evolves the concept of task orchestration into an AI-ready framework. It maintains the "Zero-Gravity" architecture (no external dependencies) while introducing a Semantic Layer for LLM integration and dynamic flow generation.
|
|
83
|
+
|
|
84
|
+
## Key Concepts
|
|
85
|
+
|
|
86
|
+
1. **Block:** The atomic unit of execution (formerly Task).
|
|
87
|
+
2. **Chain:** A linear sequence of Blocks (formerly Process).
|
|
88
|
+
3. **Flow:** High-level orchestrator with failure strategies (formerly Workflow).
|
|
89
|
+
|
|
90
|
+
## Installation
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pip install vibeblocks
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Publishing To PyPI
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
python -m pip install --upgrade build twine
|
|
100
|
+
python -m build
|
|
101
|
+
python -m twine check dist/*
|
|
102
|
+
python -m twine upload dist/*
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
For a safer first release, upload to TestPyPI first:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
python -m twine upload --repository testpypi dist/*
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Quick Start
|
|
112
|
+
|
|
113
|
+
### 1. Classic Usage
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from vibeblocks import Flow, ExecutionContext, block, execute_flow
|
|
117
|
+
|
|
118
|
+
# 1. Define your blocks with @block decorator
|
|
119
|
+
@block(description="Extracts data from source")
|
|
120
|
+
def extract(ctx: ExecutionContext):
|
|
121
|
+
print("Extracting data...")
|
|
122
|
+
ctx.data["raw"] = [1, 2, 3, 4, 5]
|
|
123
|
+
return ctx.data["raw"]
|
|
124
|
+
|
|
125
|
+
@block(description="Doubles the input values")
|
|
126
|
+
def transform(ctx: ExecutionContext):
|
|
127
|
+
print("Transforming data...")
|
|
128
|
+
data = ctx.data["raw"]
|
|
129
|
+
ctx.data['processed'] = [x * 2 for x in data]
|
|
130
|
+
return ctx.data['processed']
|
|
131
|
+
|
|
132
|
+
@block(description="Loads data to destination")
|
|
133
|
+
def load(ctx: ExecutionContext):
|
|
134
|
+
print(f"Loading data: {ctx.data['processed']}")
|
|
135
|
+
return True
|
|
136
|
+
|
|
137
|
+
# 2. Create the Flow
|
|
138
|
+
pipeline = Flow("ETL_Flow", [extract, transform, load])
|
|
139
|
+
|
|
140
|
+
# 3. Execute
|
|
141
|
+
result = execute_flow(pipeline, data={})
|
|
142
|
+
|
|
143
|
+
if result.status == "SUCCESS":
|
|
144
|
+
print("Flow completed successfully!")
|
|
145
|
+
else:
|
|
146
|
+
print(f"Flow failed: {result.errors}")
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### 2. AI-Driven Dynamic Flows
|
|
150
|
+
|
|
151
|
+
VibeBlocks allows LLMs to generate flows on the fly using JSON schemas.
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from vibeblocks.vibeblocks import VibeBlocks
|
|
155
|
+
|
|
156
|
+
# JSON definition (could come from an LLM)
|
|
157
|
+
flow_request = {
|
|
158
|
+
"name": "DynamicETL",
|
|
159
|
+
"steps": ["extract", "transform", "load"],
|
|
160
|
+
"strategy": "ABORT"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
# Available blocks registry
|
|
164
|
+
blocks_registry = {
|
|
165
|
+
"extract": extract,
|
|
166
|
+
"transform": transform,
|
|
167
|
+
"load": load
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
# Execute dynamically
|
|
171
|
+
result = VibeBlocks.run_from_json(flow_request, initial_data={}, available_blocks=blocks_registry)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# VibeBlocks
|
|
2
|
+
|
|
3
|
+
**AI-First Orchestration for Python.**
|
|
4
|
+
|
|
5
|
+
VibeBlocks evolves the concept of task orchestration into an AI-ready framework. It maintains the "Zero-Gravity" architecture (no external dependencies) while introducing a Semantic Layer for LLM integration and dynamic flow generation.
|
|
6
|
+
|
|
7
|
+
## Key Concepts
|
|
8
|
+
|
|
9
|
+
1. **Block:** The atomic unit of execution (formerly Task).
|
|
10
|
+
2. **Chain:** A linear sequence of Blocks (formerly Process).
|
|
11
|
+
3. **Flow:** High-level orchestrator with failure strategies (formerly Workflow).
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install vibeblocks
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Publishing To PyPI
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python -m pip install --upgrade build twine
|
|
23
|
+
python -m build
|
|
24
|
+
python -m twine check dist/*
|
|
25
|
+
python -m twine upload dist/*
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For a safer first release, upload to TestPyPI first:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
python -m twine upload --repository testpypi dist/*
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
### 1. Classic Usage
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from vibeblocks import Flow, ExecutionContext, block, execute_flow
|
|
40
|
+
|
|
41
|
+
# 1. Define your blocks with @block decorator
|
|
42
|
+
@block(description="Extracts data from source")
|
|
43
|
+
def extract(ctx: ExecutionContext):
|
|
44
|
+
print("Extracting data...")
|
|
45
|
+
ctx.data["raw"] = [1, 2, 3, 4, 5]
|
|
46
|
+
return ctx.data["raw"]
|
|
47
|
+
|
|
48
|
+
@block(description="Doubles the input values")
|
|
49
|
+
def transform(ctx: ExecutionContext):
|
|
50
|
+
print("Transforming data...")
|
|
51
|
+
data = ctx.data["raw"]
|
|
52
|
+
ctx.data['processed'] = [x * 2 for x in data]
|
|
53
|
+
return ctx.data['processed']
|
|
54
|
+
|
|
55
|
+
@block(description="Loads data to destination")
|
|
56
|
+
def load(ctx: ExecutionContext):
|
|
57
|
+
print(f"Loading data: {ctx.data['processed']}")
|
|
58
|
+
return True
|
|
59
|
+
|
|
60
|
+
# 2. Create the Flow
|
|
61
|
+
pipeline = Flow("ETL_Flow", [extract, transform, load])
|
|
62
|
+
|
|
63
|
+
# 3. Execute
|
|
64
|
+
result = execute_flow(pipeline, data={})
|
|
65
|
+
|
|
66
|
+
if result.status == "SUCCESS":
|
|
67
|
+
print("Flow completed successfully!")
|
|
68
|
+
else:
|
|
69
|
+
print(f"Flow failed: {result.errors}")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 2. AI-Driven Dynamic Flows
|
|
73
|
+
|
|
74
|
+
VibeBlocks allows LLMs to generate flows on the fly using JSON schemas.
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from vibeblocks.vibeblocks import VibeBlocks
|
|
78
|
+
|
|
79
|
+
# JSON definition (could come from an LLM)
|
|
80
|
+
flow_request = {
|
|
81
|
+
"name": "DynamicETL",
|
|
82
|
+
"steps": ["extract", "transform", "load"],
|
|
83
|
+
"strategy": "ABORT"
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# Available blocks registry
|
|
87
|
+
blocks_registry = {
|
|
88
|
+
"extract": extract,
|
|
89
|
+
"transform": transform,
|
|
90
|
+
"load": load
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# Execute dynamically
|
|
94
|
+
result = VibeBlocks.run_from_json(flow_request, initial_data={}, available_blocks=blocks_registry)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "vibeblocks"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Lightweight Python workflow orchestration library for AI agents, async task execution, retries, and failure-safe automation."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
dependencies = []
|
|
12
|
+
license = { file = "LICENSE" }
|
|
13
|
+
license-files = ["LICENSE"]
|
|
14
|
+
keywords = [
|
|
15
|
+
"workflow orchestration",
|
|
16
|
+
"python automation",
|
|
17
|
+
"ai agents",
|
|
18
|
+
"task execution",
|
|
19
|
+
"async workflows",
|
|
20
|
+
"retry logic",
|
|
21
|
+
"failure recovery",
|
|
22
|
+
"llm orchestration",
|
|
23
|
+
]
|
|
24
|
+
authors = [
|
|
25
|
+
{ name = "Alejandro Avendaño", email = "aavendano79@gmail.com" },
|
|
26
|
+
]
|
|
27
|
+
maintainers = [
|
|
28
|
+
{ name = "AADigitalBusiness", email = "admin@aadigitalbusiness.com" },
|
|
29
|
+
]
|
|
30
|
+
classifiers = [
|
|
31
|
+
"Development Status :: 4 - Beta",
|
|
32
|
+
"Intended Audience :: Developers",
|
|
33
|
+
"Intended Audience :: Information Technology",
|
|
34
|
+
"Operating System :: OS Independent",
|
|
35
|
+
"Programming Language :: Python",
|
|
36
|
+
"License :: OSI Approved :: MIT License",
|
|
37
|
+
"Programming Language :: Python :: 3",
|
|
38
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
39
|
+
"Programming Language :: Python :: 3.8",
|
|
40
|
+
"Programming Language :: Python :: 3.9",
|
|
41
|
+
"Programming Language :: Python :: 3.10",
|
|
42
|
+
"Programming Language :: Python :: 3.11",
|
|
43
|
+
"Programming Language :: Python :: 3.12",
|
|
44
|
+
"Typing :: Typed",
|
|
45
|
+
"Framework :: AsyncIO",
|
|
46
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
47
|
+
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
48
|
+
"Topic :: Software Development :: Libraries",
|
|
49
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
50
|
+
"Topic :: System :: Distributed Computing",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[project.urls]
|
|
54
|
+
Homepage = "https://github.com/AADigitalBusiness/vibeblocks"
|
|
55
|
+
Documentation = "https://github.com/AADigitalBusiness/vibeblocks#readme"
|
|
56
|
+
Issues = "https://github.com/AADigitalBusiness/vibeblocks/issues"
|
|
57
|
+
Repository = "https://github.com/AADigitalBusiness/vibeblocks"
|
|
58
|
+
Source = "https://github.com/AADigitalBusiness/vibeblocks"
|
|
59
|
+
Changelog = "https://github.com/AADigitalBusiness/vibeblocks/blob/main/CHANGELOG.md"
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.wheel]
|
|
62
|
+
packages = ["src/vibeblocks"]
|
|
63
|
+
|
|
64
|
+
[tool.hatch.build.targets.sdist]
|
|
65
|
+
include = [
|
|
66
|
+
"/src",
|
|
67
|
+
"/README.md",
|
|
68
|
+
"/LICENSE",
|
|
69
|
+
"/CHANGELOG.md",
|
|
70
|
+
"/pyproject.toml",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
[tool.hatch.version]
|
|
74
|
+
path = "src/vibeblocks/__init__.py"
|
|
75
|
+
|
|
76
|
+
[tool.pytest.ini_options]
|
|
77
|
+
addopts = "--strict-markers"
|
|
78
|
+
testpaths = ["tests"]
|
|
79
|
+
pythonpath = ["src"]
|
|
80
|
+
|
|
81
|
+
[project.optional-dependencies]
|
|
82
|
+
test = [
|
|
83
|
+
"pytest",
|
|
84
|
+
]
|
|
85
|
+
docs = [
|
|
86
|
+
"sphinx",
|
|
87
|
+
"myst-parser",
|
|
88
|
+
"sphinx-rtd-theme",
|
|
89
|
+
]
|
|
90
|
+
release = [
|
|
91
|
+
"build",
|
|
92
|
+
"hatchling",
|
|
93
|
+
"twine",
|
|
94
|
+
]
|
|
95
|
+
dev = [
|
|
96
|
+
"pytest",
|
|
97
|
+
"sphinx",
|
|
98
|
+
"myst-parser",
|
|
99
|
+
"sphinx-rtd-theme",
|
|
100
|
+
"ruff",
|
|
101
|
+
"build",
|
|
102
|
+
"hatchling",
|
|
103
|
+
"twine",
|
|
104
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
2
|
+
|
|
3
|
+
from vibeblocks.core.context import ExecutionContext
|
|
4
|
+
from vibeblocks.components.block import Block
|
|
5
|
+
from vibeblocks.components.chain import Chain
|
|
6
|
+
from vibeblocks.components.flow import Flow
|
|
7
|
+
from vibeblocks.runtime.runner import SyncRunner, AsyncRunner
|
|
8
|
+
from vibeblocks.core.decorators import block
|
|
9
|
+
from vibeblocks.policies.failure import FailureStrategy
|
|
10
|
+
from vibeblocks.utils.execution import execute_flow
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"Block",
|
|
14
|
+
"Chain",
|
|
15
|
+
"Flow",
|
|
16
|
+
"ExecutionContext",
|
|
17
|
+
"SyncRunner",
|
|
18
|
+
"AsyncRunner",
|
|
19
|
+
"block",
|
|
20
|
+
"FailureStrategy",
|
|
21
|
+
"execute_flow",
|
|
22
|
+
]
|
|
File without changes
|