hexdag-plugins 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.
- hexdag_plugins-0.1.0/.gitignore +43 -0
- hexdag_plugins-0.1.0/PKG-INFO +161 -0
- hexdag_plugins-0.1.0/README.md +81 -0
- hexdag_plugins-0.1.0/azure/LICENSE +21 -0
- hexdag_plugins-0.1.0/azure/README.md +414 -0
- hexdag_plugins-0.1.0/hexdag_etl/README.md +166 -0
- hexdag_plugins-0.1.0/mysql_adapter/LICENSE +21 -0
- hexdag_plugins-0.1.0/mysql_adapter/README.md +232 -0
- hexdag_plugins-0.1.0/pyproject.toml +138 -0
- hexdag_plugins-0.1.0/storage/README.md +183 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
# Testing
|
|
13
|
+
.coverage
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
htmlcov/
|
|
16
|
+
.tox/
|
|
17
|
+
.hypothesis/
|
|
18
|
+
|
|
19
|
+
# IDE
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
*.swp
|
|
23
|
+
*.swo
|
|
24
|
+
*~
|
|
25
|
+
.DS_Store
|
|
26
|
+
|
|
27
|
+
# Virtual environments
|
|
28
|
+
venv/
|
|
29
|
+
env/
|
|
30
|
+
ENV/
|
|
31
|
+
|
|
32
|
+
# Mypy
|
|
33
|
+
.mypy_cache/
|
|
34
|
+
.dmypy.json
|
|
35
|
+
dmypy.json
|
|
36
|
+
|
|
37
|
+
# Ruff
|
|
38
|
+
.ruff_cache/
|
|
39
|
+
|
|
40
|
+
# Plugin builds
|
|
41
|
+
*/dist/
|
|
42
|
+
*/build/
|
|
43
|
+
*/*.egg-info/
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hexdag-plugins
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official plugins for hexDAG framework - Azure, MySQL, ETL, and storage adapters
|
|
5
|
+
Project-URL: Homepage, https://hexdag.ai
|
|
6
|
+
Project-URL: Repository, https://github.com/omniviser/hexdag
|
|
7
|
+
Project-URL: Documentation, https://hexdag.ai/docs/plugins
|
|
8
|
+
Project-URL: Bug Reports, https://github.com/omniviser/hexdag/issues
|
|
9
|
+
Author-email: hexDAG Team <team@hexdag.ai>
|
|
10
|
+
License: MIT
|
|
11
|
+
Keywords: adapter,azure,etl,hexdag,mysql,plugins,storage
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Requires-Dist: hexdag>=0.5.0
|
|
21
|
+
Provides-Extra: all
|
|
22
|
+
Requires-Dist: aiohttp>=3.8.0; extra == 'all'
|
|
23
|
+
Requires-Dist: aiomysql>=0.2.0; extra == 'all'
|
|
24
|
+
Requires-Dist: asyncpg>=0.29.0; extra == 'all'
|
|
25
|
+
Requires-Dist: azure-cosmos>=4.3.0; extra == 'all'
|
|
26
|
+
Requires-Dist: azure-identity>=1.13.0; extra == 'all'
|
|
27
|
+
Requires-Dist: azure-keyvault-secrets>=4.4.0; extra == 'all'
|
|
28
|
+
Requires-Dist: azure-storage-blob>=12.13.0; extra == 'all'
|
|
29
|
+
Requires-Dist: chromadb>=0.4.0; extra == 'all'
|
|
30
|
+
Requires-Dist: openai>=1.0.0; extra == 'all'
|
|
31
|
+
Requires-Dist: pandas>=2.0.0; extra == 'all'
|
|
32
|
+
Requires-Dist: pgvector>=0.3.0; extra == 'all'
|
|
33
|
+
Requires-Dist: pymysql>=1.1.0; extra == 'all'
|
|
34
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'all'
|
|
35
|
+
Provides-Extra: azure
|
|
36
|
+
Requires-Dist: openai>=1.0.0; extra == 'azure'
|
|
37
|
+
Provides-Extra: azure-all
|
|
38
|
+
Requires-Dist: azure-cosmos>=4.3.0; extra == 'azure-all'
|
|
39
|
+
Requires-Dist: azure-identity>=1.13.0; extra == 'azure-all'
|
|
40
|
+
Requires-Dist: azure-keyvault-secrets>=4.4.0; extra == 'azure-all'
|
|
41
|
+
Requires-Dist: azure-storage-blob>=12.13.0; extra == 'azure-all'
|
|
42
|
+
Requires-Dist: openai>=1.0.0; extra == 'azure-all'
|
|
43
|
+
Provides-Extra: azure-blob
|
|
44
|
+
Requires-Dist: azure-identity>=1.13.0; extra == 'azure-blob'
|
|
45
|
+
Requires-Dist: azure-storage-blob>=12.13.0; extra == 'azure-blob'
|
|
46
|
+
Provides-Extra: azure-cosmos
|
|
47
|
+
Requires-Dist: azure-cosmos>=4.3.0; extra == 'azure-cosmos'
|
|
48
|
+
Requires-Dist: azure-identity>=1.13.0; extra == 'azure-cosmos'
|
|
49
|
+
Provides-Extra: azure-keyvault
|
|
50
|
+
Requires-Dist: azure-identity>=1.13.0; extra == 'azure-keyvault'
|
|
51
|
+
Requires-Dist: azure-keyvault-secrets>=4.4.0; extra == 'azure-keyvault'
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
54
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
55
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
|
|
56
|
+
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
|
|
57
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
58
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
59
|
+
Provides-Extra: etl
|
|
60
|
+
Requires-Dist: aiohttp>=3.8.0; extra == 'etl'
|
|
61
|
+
Requires-Dist: pandas>=2.0.0; extra == 'etl'
|
|
62
|
+
Provides-Extra: mysql
|
|
63
|
+
Requires-Dist: pymysql>=1.1.0; extra == 'mysql'
|
|
64
|
+
Provides-Extra: storage-all
|
|
65
|
+
Requires-Dist: aiomysql>=0.2.0; extra == 'storage-all'
|
|
66
|
+
Requires-Dist: asyncpg>=0.29.0; extra == 'storage-all'
|
|
67
|
+
Requires-Dist: chromadb>=0.4.0; extra == 'storage-all'
|
|
68
|
+
Requires-Dist: pgvector>=0.3.0; extra == 'storage-all'
|
|
69
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'storage-all'
|
|
70
|
+
Provides-Extra: storage-chromadb
|
|
71
|
+
Requires-Dist: chromadb>=0.4.0; extra == 'storage-chromadb'
|
|
72
|
+
Provides-Extra: storage-mysql
|
|
73
|
+
Requires-Dist: aiomysql>=0.2.0; extra == 'storage-mysql'
|
|
74
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'storage-mysql'
|
|
75
|
+
Provides-Extra: storage-postgresql
|
|
76
|
+
Requires-Dist: asyncpg>=0.29.0; extra == 'storage-postgresql'
|
|
77
|
+
Requires-Dist: pgvector>=0.3.0; extra == 'storage-postgresql'
|
|
78
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'storage-postgresql'
|
|
79
|
+
Description-Content-Type: text/markdown
|
|
80
|
+
|
|
81
|
+
# hexDAG Plugins
|
|
82
|
+
|
|
83
|
+
This directory contains plugins that extend hexDAG's functionality.
|
|
84
|
+
|
|
85
|
+
## Available Plugins
|
|
86
|
+
|
|
87
|
+
| Plugin | Description | Port |
|
|
88
|
+
|--------|-------------|------|
|
|
89
|
+
| `mysql_adapter` | Production MySQL adapter with JSON support | database |
|
|
90
|
+
|
|
91
|
+
## Simple Plugin Workflow
|
|
92
|
+
|
|
93
|
+
Each plugin is a standalone Python package. Just use standard Python tools:
|
|
94
|
+
|
|
95
|
+
### Install & Test
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Install a plugin
|
|
99
|
+
uv pip install -e hexdag_plugins/mysql_adapter/
|
|
100
|
+
|
|
101
|
+
# Run tests
|
|
102
|
+
uv run pytest hexdag_plugins/mysql_adapter/tests/
|
|
103
|
+
|
|
104
|
+
# Format code (uses settings from plugin's pyproject.toml)
|
|
105
|
+
cd hexdag_plugins/mysql_adapter
|
|
106
|
+
uv run ruff format .
|
|
107
|
+
uv run ruff check --fix .
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Pre-commit Integration
|
|
111
|
+
|
|
112
|
+
Plugin files are automatically handled by the main pre-commit configuration. When you commit:
|
|
113
|
+
- **Plugin files** (`hexdag_plugins/`) use plugin-specific hooks with relaxed rules
|
|
114
|
+
- **Main code** (`hexdag/`) uses strict project hooks
|
|
115
|
+
|
|
116
|
+
This happens automatically - just commit normally and the right hooks run!
|
|
117
|
+
|
|
118
|
+
### Plugin Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
hexdag_plugins/
|
|
122
|
+
└── my_plugin/
|
|
123
|
+
├── pyproject.toml # Plugin configuration & dependencies
|
|
124
|
+
├── __init__.py
|
|
125
|
+
├── my_plugin.py # Implementation
|
|
126
|
+
└── tests/
|
|
127
|
+
└── test_my_plugin.py
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Creating a New Plugin
|
|
131
|
+
|
|
132
|
+
1. Copy an existing plugin directory as a template
|
|
133
|
+
2. Update `pyproject.toml` with your plugin details
|
|
134
|
+
3. Implement the required port interface
|
|
135
|
+
4. Write tests
|
|
136
|
+
|
|
137
|
+
The `pyproject.toml` contains all configuration:
|
|
138
|
+
- Dependencies
|
|
139
|
+
- Tool settings (ruff, mypy, pytest)
|
|
140
|
+
- Plugin metadata for hexDAG
|
|
141
|
+
|
|
142
|
+
## Using Plugins
|
|
143
|
+
|
|
144
|
+
Plugins are used by referencing their full module path in YAML:
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
spec:
|
|
148
|
+
ports:
|
|
149
|
+
database:
|
|
150
|
+
adapter: hexdag_plugins.mysql_adapter.MySQLAdapter
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Or import directly in Python:
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from hexdag_plugins.mysql_adapter import MySQLAdapter
|
|
157
|
+
|
|
158
|
+
adapter = MySQLAdapter(host="localhost", database="mydb")
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
That's it! No complex scripts or build tools needed.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# hexDAG Plugins
|
|
2
|
+
|
|
3
|
+
This directory contains plugins that extend hexDAG's functionality.
|
|
4
|
+
|
|
5
|
+
## Available Plugins
|
|
6
|
+
|
|
7
|
+
| Plugin | Description | Port |
|
|
8
|
+
|--------|-------------|------|
|
|
9
|
+
| `mysql_adapter` | Production MySQL adapter with JSON support | database |
|
|
10
|
+
|
|
11
|
+
## Simple Plugin Workflow
|
|
12
|
+
|
|
13
|
+
Each plugin is a standalone Python package. Just use standard Python tools:
|
|
14
|
+
|
|
15
|
+
### Install & Test
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Install a plugin
|
|
19
|
+
uv pip install -e hexdag_plugins/mysql_adapter/
|
|
20
|
+
|
|
21
|
+
# Run tests
|
|
22
|
+
uv run pytest hexdag_plugins/mysql_adapter/tests/
|
|
23
|
+
|
|
24
|
+
# Format code (uses settings from plugin's pyproject.toml)
|
|
25
|
+
cd hexdag_plugins/mysql_adapter
|
|
26
|
+
uv run ruff format .
|
|
27
|
+
uv run ruff check --fix .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Pre-commit Integration
|
|
31
|
+
|
|
32
|
+
Plugin files are automatically handled by the main pre-commit configuration. When you commit:
|
|
33
|
+
- **Plugin files** (`hexdag_plugins/`) use plugin-specific hooks with relaxed rules
|
|
34
|
+
- **Main code** (`hexdag/`) uses strict project hooks
|
|
35
|
+
|
|
36
|
+
This happens automatically - just commit normally and the right hooks run!
|
|
37
|
+
|
|
38
|
+
### Plugin Structure
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
hexdag_plugins/
|
|
42
|
+
└── my_plugin/
|
|
43
|
+
├── pyproject.toml # Plugin configuration & dependencies
|
|
44
|
+
├── __init__.py
|
|
45
|
+
├── my_plugin.py # Implementation
|
|
46
|
+
└── tests/
|
|
47
|
+
└── test_my_plugin.py
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Creating a New Plugin
|
|
51
|
+
|
|
52
|
+
1. Copy an existing plugin directory as a template
|
|
53
|
+
2. Update `pyproject.toml` with your plugin details
|
|
54
|
+
3. Implement the required port interface
|
|
55
|
+
4. Write tests
|
|
56
|
+
|
|
57
|
+
The `pyproject.toml` contains all configuration:
|
|
58
|
+
- Dependencies
|
|
59
|
+
- Tool settings (ruff, mypy, pytest)
|
|
60
|
+
- Plugin metadata for hexDAG
|
|
61
|
+
|
|
62
|
+
## Using Plugins
|
|
63
|
+
|
|
64
|
+
Plugins are used by referencing their full module path in YAML:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
spec:
|
|
68
|
+
ports:
|
|
69
|
+
database:
|
|
70
|
+
adapter: hexdag_plugins.mysql_adapter.MySQLAdapter
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Or import directly in Python:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from hexdag_plugins.mysql_adapter import MySQLAdapter
|
|
77
|
+
|
|
78
|
+
adapter = MySQLAdapter(host="localhost", database="mydb")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
That's it! No complex scripts or build tools needed.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 HexDAG Team
|
|
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.
|