ciaren-client 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.
- ciaren_client-0.1.0/.gitignore +266 -0
- ciaren_client-0.1.0/PKG-INFO +81 -0
- ciaren_client-0.1.0/README.md +51 -0
- ciaren_client-0.1.0/ciaren_client/__init__.py +65 -0
- ciaren_client-0.1.0/ciaren_client/_async.py +597 -0
- ciaren_client-0.1.0/ciaren_client/_sync.py +591 -0
- ciaren_client-0.1.0/ciaren_client/_types.py +179 -0
- ciaren_client-0.1.0/ciaren_client/py.typed +1 -0
- ciaren_client-0.1.0/pyproject.toml +57 -0
- ciaren_client-0.1.0/tests/test_client.py +626 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
# …but keep the committed example signed plugin artifact (reproducible demo).
|
|
15
|
+
!examples/plugins/dist/
|
|
16
|
+
!examples/plugins/dist/*.ciarenplugin
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py.cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# Generated from the root CHANGELOG.md by docs/scripts/sync-changelog.js
|
|
78
|
+
# (npm run predev / prebuild) — root file is the source of truth.
|
|
79
|
+
docs/guide/changelog.md
|
|
80
|
+
|
|
81
|
+
# PyBuilder
|
|
82
|
+
.pybuilder/
|
|
83
|
+
target/
|
|
84
|
+
|
|
85
|
+
# Jupyter Notebook
|
|
86
|
+
.ipynb_checkpoints
|
|
87
|
+
|
|
88
|
+
# IPython
|
|
89
|
+
profile_default/
|
|
90
|
+
ipython_config.py
|
|
91
|
+
|
|
92
|
+
# pyenv
|
|
93
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
94
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
95
|
+
# .python-version
|
|
96
|
+
|
|
97
|
+
# pipenv
|
|
98
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
99
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
100
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
101
|
+
# install all needed dependencies.
|
|
102
|
+
# Pipfile.lock
|
|
103
|
+
|
|
104
|
+
# UV
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# uv.lock
|
|
109
|
+
|
|
110
|
+
# poetry
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
112
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
113
|
+
# commonly ignored for libraries.
|
|
114
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
115
|
+
# poetry.lock
|
|
116
|
+
# poetry.toml
|
|
117
|
+
|
|
118
|
+
# pdm
|
|
119
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
120
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
121
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
122
|
+
# pdm.lock
|
|
123
|
+
# pdm.toml
|
|
124
|
+
.pdm-python
|
|
125
|
+
.pdm-build/
|
|
126
|
+
|
|
127
|
+
# pixi
|
|
128
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
129
|
+
# pixi.lock
|
|
130
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
131
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
132
|
+
.pixi
|
|
133
|
+
|
|
134
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
135
|
+
__pypackages__/
|
|
136
|
+
|
|
137
|
+
# Celery stuff
|
|
138
|
+
celerybeat-schedule
|
|
139
|
+
celerybeat.pid
|
|
140
|
+
|
|
141
|
+
# Redis
|
|
142
|
+
*.rdb
|
|
143
|
+
*.aof
|
|
144
|
+
*.pid
|
|
145
|
+
|
|
146
|
+
# RabbitMQ
|
|
147
|
+
mnesia/
|
|
148
|
+
rabbitmq/
|
|
149
|
+
rabbitmq-data/
|
|
150
|
+
|
|
151
|
+
# ActiveMQ
|
|
152
|
+
activemq-data/
|
|
153
|
+
|
|
154
|
+
# SageMath parsed files
|
|
155
|
+
*.sage.py
|
|
156
|
+
|
|
157
|
+
# Environments
|
|
158
|
+
.env
|
|
159
|
+
.envrc
|
|
160
|
+
.venv
|
|
161
|
+
env/
|
|
162
|
+
venv/
|
|
163
|
+
ENV/
|
|
164
|
+
env.bak/
|
|
165
|
+
venv.bak/
|
|
166
|
+
|
|
167
|
+
# Spyder project settings
|
|
168
|
+
.spyderproject
|
|
169
|
+
.spyproject
|
|
170
|
+
|
|
171
|
+
# Rope project settings
|
|
172
|
+
.ropeproject
|
|
173
|
+
|
|
174
|
+
# mkdocs documentation
|
|
175
|
+
/site
|
|
176
|
+
|
|
177
|
+
# mypy
|
|
178
|
+
.mypy_cache/
|
|
179
|
+
.dmypy.json
|
|
180
|
+
dmypy.json
|
|
181
|
+
|
|
182
|
+
# Pyre type checker
|
|
183
|
+
.pyre/
|
|
184
|
+
|
|
185
|
+
# pytype static type analyzer
|
|
186
|
+
.pytype/
|
|
187
|
+
|
|
188
|
+
# Cython debug symbols
|
|
189
|
+
cython_debug/
|
|
190
|
+
|
|
191
|
+
# PyCharm
|
|
192
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
193
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
194
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
195
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
196
|
+
# .idea/
|
|
197
|
+
|
|
198
|
+
# Abstra
|
|
199
|
+
# Abstra is an AI-powered process automation framework.
|
|
200
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
201
|
+
# Learn more at https://abstra.io/docs
|
|
202
|
+
.abstra/
|
|
203
|
+
|
|
204
|
+
# Visual Studio Code
|
|
205
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
206
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
207
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
208
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
209
|
+
# .vscode/
|
|
210
|
+
# Temporary file for partial code execution
|
|
211
|
+
tempCodeRunnerFile.py
|
|
212
|
+
|
|
213
|
+
# Ruff stuff:
|
|
214
|
+
.ruff_cache/
|
|
215
|
+
|
|
216
|
+
# PyPI configuration file
|
|
217
|
+
.pypirc
|
|
218
|
+
|
|
219
|
+
# Marimo
|
|
220
|
+
marimo/_static/
|
|
221
|
+
marimo/_lsp/
|
|
222
|
+
__marimo__/
|
|
223
|
+
|
|
224
|
+
# Streamlit
|
|
225
|
+
.streamlit/secrets.toml
|
|
226
|
+
|
|
227
|
+
.idea/
|
|
228
|
+
.CLAUDE.md
|
|
229
|
+
.architecture.md
|
|
230
|
+
|
|
231
|
+
# Local AI assistant/tooling state (personal workspace only)
|
|
232
|
+
.claude/
|
|
233
|
+
.codex/
|
|
234
|
+
.codex_tmp/
|
|
235
|
+
.agents/
|
|
236
|
+
backend/.claude/
|
|
237
|
+
local.claude.md
|
|
238
|
+
|
|
239
|
+
# Local-only maintainer notes/planning docs (not for VCS)
|
|
240
|
+
internal/
|
|
241
|
+
BRAND_GUIDELINES.md
|
|
242
|
+
|
|
243
|
+
# Local dev databases / data dirs (SQLite default; not for VCS)
|
|
244
|
+
*.db
|
|
245
|
+
*.db-journal
|
|
246
|
+
*.sqlite
|
|
247
|
+
*.sqlite3
|
|
248
|
+
*.sqlite-journal
|
|
249
|
+
.data/
|
|
250
|
+
backend/*.db
|
|
251
|
+
backend/.dev_data/
|
|
252
|
+
backend/.data/
|
|
253
|
+
|
|
254
|
+
# MLflow local store + model artifacts (created by `ciaren init` / training)
|
|
255
|
+
mlruns/
|
|
256
|
+
mlartifacts/
|
|
257
|
+
backend/mlruns/
|
|
258
|
+
backend/mlartifacts/
|
|
259
|
+
|
|
260
|
+
# Web UI bundled into the wheel at build time (generated from frontend/dist)
|
|
261
|
+
backend/app/web/
|
|
262
|
+
|
|
263
|
+
# Node (frontend/ and docs/ have their own ignores; this covers any root-level
|
|
264
|
+
# node_modules created by running npm/vitest from the repo root)
|
|
265
|
+
node_modules/
|
|
266
|
+
.vite/
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ciaren-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client for the Ciaren visual data and ML workflow server
|
|
5
|
+
Project-URL: Homepage, https://www.ciaren.com/
|
|
6
|
+
Project-URL: Repository, https://github.com/ciaren-labs/Ciaren
|
|
7
|
+
Project-URL: Documentation, https://ciaren.com/docs
|
|
8
|
+
Project-URL: Issues, https://github.com/ciaren-labs/Ciaren/issues
|
|
9
|
+
Project-URL: Author, https://www.linkedin.com/in/rodrigo-arenas-gomez/
|
|
10
|
+
Author-email: Rodrigo Arenas <31422766+rodrigo-arenas@users.noreply.github.com>
|
|
11
|
+
License: Apache-2.0
|
|
12
|
+
Keywords: api-client,ciaren,data,data-engineering,etl,ml,workflow
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: httpx>=0.24
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
28
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# ciaren-client
|
|
32
|
+
|
|
33
|
+
`ciaren-client` is the lightweight Python SDK for Ciaren. It talks to the
|
|
34
|
+
Ciaren REST API without installing the full application.
|
|
35
|
+
|
|
36
|
+
> Status: alpha (pre-1.0), `0.1.0`. Breaking changes are expected before `1.0.0`.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m pip install ciaren-client
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For local development from this repository:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install -e path/to/Ciaren/client
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from ciaren_client import Ciaren
|
|
54
|
+
|
|
55
|
+
with Ciaren("http://localhost:8055", webhook_secret="my-secret") as client:
|
|
56
|
+
run = client.trigger("flow-id", parameters={"date": "2026-07-01"})
|
|
57
|
+
print(run["status"])
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Async usage is available through `AsyncCiaren`:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from ciaren_client import AsyncCiaren
|
|
64
|
+
|
|
65
|
+
async with AsyncCiaren("http://localhost:8055", webhook_secret="my-secret") as client:
|
|
66
|
+
run = await client.trigger("flow-id")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## What It Covers
|
|
70
|
+
|
|
71
|
+
The client includes typed sync and async methods for projects, datasets, flows,
|
|
72
|
+
runs, schedules, connections (including OS-keychain secrets), catalog metadata,
|
|
73
|
+
transformations, runtime app settings, ML helpers, plugins, marketplace
|
|
74
|
+
endpoints, webhook triggers, and SSE run logs.
|
|
75
|
+
|
|
76
|
+
Use `api_token` when the server is configured with `CIAREN_API_TOKEN`.
|
|
77
|
+
Use `webhook_secret` only for `trigger()`, which calls the webhook endpoint.
|
|
78
|
+
|
|
79
|
+
License: Apache-2.0.
|
|
80
|
+
|
|
81
|
+
See the [SDK documentation](https://ciaren.com/docs/guide/sdk).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# ciaren-client
|
|
2
|
+
|
|
3
|
+
`ciaren-client` is the lightweight Python SDK for Ciaren. It talks to the
|
|
4
|
+
Ciaren REST API without installing the full application.
|
|
5
|
+
|
|
6
|
+
> Status: alpha (pre-1.0), `0.1.0`. Breaking changes are expected before `1.0.0`.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
python -m pip install ciaren-client
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
For local development from this repository:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install -e path/to/Ciaren/client
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from ciaren_client import Ciaren
|
|
24
|
+
|
|
25
|
+
with Ciaren("http://localhost:8055", webhook_secret="my-secret") as client:
|
|
26
|
+
run = client.trigger("flow-id", parameters={"date": "2026-07-01"})
|
|
27
|
+
print(run["status"])
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Async usage is available through `AsyncCiaren`:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from ciaren_client import AsyncCiaren
|
|
34
|
+
|
|
35
|
+
async with AsyncCiaren("http://localhost:8055", webhook_secret="my-secret") as client:
|
|
36
|
+
run = await client.trigger("flow-id")
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## What It Covers
|
|
40
|
+
|
|
41
|
+
The client includes typed sync and async methods for projects, datasets, flows,
|
|
42
|
+
runs, schedules, connections (including OS-keychain secrets), catalog metadata,
|
|
43
|
+
transformations, runtime app settings, ML helpers, plugins, marketplace
|
|
44
|
+
endpoints, webhook triggers, and SSE run logs.
|
|
45
|
+
|
|
46
|
+
Use `api_token` when the server is configured with `CIAREN_API_TOKEN`.
|
|
47
|
+
Use `webhook_secret` only for `trigger()`, which calls the webhook endpoint.
|
|
48
|
+
|
|
49
|
+
License: Apache-2.0.
|
|
50
|
+
|
|
51
|
+
See the [SDK documentation](https://ciaren.com/docs/guide/sdk).
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""ciaren-client — thin HTTP client for the Ciaren visual data and ML workflow server.
|
|
2
|
+
|
|
3
|
+
Sync usage::
|
|
4
|
+
|
|
5
|
+
from ciaren_client import Ciaren
|
|
6
|
+
|
|
7
|
+
client = Ciaren("http://localhost:8055", webhook_secret="my-secret")
|
|
8
|
+
run = client.trigger("flow-id")
|
|
9
|
+
print(run["status"])
|
|
10
|
+
|
|
11
|
+
Async usage::
|
|
12
|
+
|
|
13
|
+
from ciaren_client import AsyncCiaren
|
|
14
|
+
|
|
15
|
+
async with AsyncCiaren("http://localhost:8055", webhook_secret="my-secret") as client:
|
|
16
|
+
run = await client.trigger("flow-id")
|
|
17
|
+
async for line in client.stream_logs(run["id"]):
|
|
18
|
+
print(line)
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from ciaren_client._async import AsyncCiaren
|
|
22
|
+
from ciaren_client._sync import Ciaren
|
|
23
|
+
from ciaren_client._types import (
|
|
24
|
+
AppSetting,
|
|
25
|
+
CodeExport,
|
|
26
|
+
Connection,
|
|
27
|
+
ConnectionTestResult,
|
|
28
|
+
Dataset,
|
|
29
|
+
DatasetVersion,
|
|
30
|
+
Flow,
|
|
31
|
+
FlowDocument,
|
|
32
|
+
FlowMigrationResult,
|
|
33
|
+
JsonDict,
|
|
34
|
+
KeyringAvailability,
|
|
35
|
+
KeyringSecretStatus,
|
|
36
|
+
Project,
|
|
37
|
+
Run,
|
|
38
|
+
RunStatus,
|
|
39
|
+
Schedule,
|
|
40
|
+
WebhookStatus,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__version__ = "0.1.0"
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
"AppSetting",
|
|
47
|
+
"AsyncCiaren",
|
|
48
|
+
"Ciaren",
|
|
49
|
+
"CodeExport",
|
|
50
|
+
"Connection",
|
|
51
|
+
"ConnectionTestResult",
|
|
52
|
+
"Dataset",
|
|
53
|
+
"DatasetVersion",
|
|
54
|
+
"Flow",
|
|
55
|
+
"FlowDocument",
|
|
56
|
+
"FlowMigrationResult",
|
|
57
|
+
"JsonDict",
|
|
58
|
+
"KeyringAvailability",
|
|
59
|
+
"KeyringSecretStatus",
|
|
60
|
+
"Project",
|
|
61
|
+
"Run",
|
|
62
|
+
"RunStatus",
|
|
63
|
+
"Schedule",
|
|
64
|
+
"WebhookStatus",
|
|
65
|
+
]
|