ducta-server 0.3.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.
- ducta_server-0.3.0/LICENSE +201 -0
- ducta_server-0.3.0/PKG-INFO +79 -0
- ducta_server-0.3.0/README.md +32 -0
- ducta_server-0.3.0/pyproject.toml +92 -0
- ducta_server-0.3.0/src/ducta_server/README.md +172 -0
- ducta_server-0.3.0/src/ducta_server/__init__.py +326 -0
- ducta_server-0.3.0/src/ducta_server/auth/__init__.py +26 -0
- ducta_server-0.3.0/src/ducta_server/auth/security.py +70 -0
- ducta_server-0.3.0/src/ducta_server/auth/service.py +183 -0
- ducta_server-0.3.0/src/ducta_server/auth/throttle.py +130 -0
- ducta_server-0.3.0/src/ducta_server/auth/users.py +138 -0
- ducta_server-0.3.0/src/ducta_server/cli.py +202 -0
- ducta_server-0.3.0/src/ducta_server/config.py +456 -0
- ducta_server-0.3.0/src/ducta_server/core/__init__.py +27 -0
- ducta_server-0.3.0/src/ducta_server/core/git_sync.py +307 -0
- ducta_server-0.3.0/src/ducta_server/core/locks.py +104 -0
- ducta_server-0.3.0/src/ducta_server/db/__init__.py +24 -0
- ducta_server-0.3.0/src/ducta_server/db/base.py +29 -0
- ducta_server-0.3.0/src/ducta_server/db/engine.py +100 -0
- ducta_server-0.3.0/src/ducta_server/db/migrate.py +143 -0
- ducta_server-0.3.0/src/ducta_server/db/migrations/__init__.py +21 -0
- ducta_server-0.3.0/src/ducta_server/db/migrations/env.py +137 -0
- ducta_server-0.3.0/src/ducta_server/db/migrations/versions/0001_initial.py +146 -0
- ducta_server-0.3.0/src/ducta_server/db/models.py +145 -0
- ducta_server-0.3.0/src/ducta_server/db/session.py +89 -0
- ducta_server-0.3.0/src/ducta_server/db/stores/__init__.py +21 -0
- ducta_server-0.3.0/src/ducta_server/db/stores/execution_store.py +248 -0
- ducta_server-0.3.0/src/ducta_server/db/stores/user_store.py +317 -0
- ducta_server-0.3.0/src/ducta_server/dependencies.py +345 -0
- ducta_server-0.3.0/src/ducta_server/exceptions.py +77 -0
- ducta_server-0.3.0/src/ducta_server/execution/__init__.py +25 -0
- ducta_server-0.3.0/src/ducta_server/execution/_registry.py +83 -0
- ducta_server-0.3.0/src/ducta_server/execution/buffering.py +234 -0
- ducta_server-0.3.0/src/ducta_server/execution/child.py +307 -0
- ducta_server-0.3.0/src/ducta_server/execution/child_runner.py +438 -0
- ducta_server-0.3.0/src/ducta_server/execution/cli_runs.py +205 -0
- ducta_server-0.3.0/src/ducta_server/execution/context.py +37 -0
- ducta_server-0.3.0/src/ducta_server/execution/debug_child.py +85 -0
- ducta_server-0.3.0/src/ducta_server/execution/error_recovery.py +309 -0
- ducta_server-0.3.0/src/ducta_server/execution/file_log_store.py +302 -0
- ducta_server-0.3.0/src/ducta_server/execution/isolation.py +188 -0
- ducta_server-0.3.0/src/ducta_server/execution/log_sink.py +102 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager.py +53 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager_dispatch.py +587 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager_lifecycle.py +213 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager_reads.py +378 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager_shared.py +37 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager_state.py +78 -0
- ducta_server-0.3.0/src/ducta_server/execution/manager_streaming.py +176 -0
- ducta_server-0.3.0/src/ducta_server/execution/output_capture.py +172 -0
- ducta_server-0.3.0/src/ducta_server/execution/queue.py +301 -0
- ducta_server-0.3.0/src/ducta_server/execution/runner.py +674 -0
- ducta_server-0.3.0/src/ducta_server/execution/scheduler.py +437 -0
- ducta_server-0.3.0/src/ducta_server/execution/store.py +140 -0
- ducta_server-0.3.0/src/ducta_server/execution/timeout.py +186 -0
- ducta_server-0.3.0/src/ducta_server/launcher.py +158 -0
- ducta_server-0.3.0/src/ducta_server/main.py +342 -0
- ducta_server-0.3.0/src/ducta_server/middleware/__init__.py +170 -0
- ducta_server-0.3.0/src/ducta_server/middleware/audit.py +93 -0
- ducta_server-0.3.0/src/ducta_server/middleware/errors.py +171 -0
- ducta_server-0.3.0/src/ducta_server/middleware/origin.py +265 -0
- ducta_server-0.3.0/src/ducta_server/middleware/rate_limit.py +401 -0
- ducta_server-0.3.0/src/ducta_server/models/__init__.py +47 -0
- ducta_server-0.3.0/src/ducta_server/models/auth.py +164 -0
- ducta_server-0.3.0/src/ducta_server/models/config.py +48 -0
- ducta_server-0.3.0/src/ducta_server/models/dataset.py +119 -0
- ducta_server-0.3.0/src/ducta_server/models/execution.py +491 -0
- ducta_server-0.3.0/src/ducta_server/models/git.py +135 -0
- ducta_server-0.3.0/src/ducta_server/models/git_sync.py +107 -0
- ducta_server-0.3.0/src/ducta_server/models/ingestion.py +97 -0
- ducta_server-0.3.0/src/ducta_server/models/node_schema.py +164 -0
- ducta_server-0.3.0/src/ducta_server/models/problems.py +58 -0
- ducta_server-0.3.0/src/ducta_server/models/project.py +136 -0
- ducta_server-0.3.0/src/ducta_server/models/quality.py +92 -0
- ducta_server-0.3.0/src/ducta_server/models/responses.py +54 -0
- ducta_server-0.3.0/src/ducta_server/models/spec.py +246 -0
- ducta_server-0.3.0/src/ducta_server/models/template.py +50 -0
- ducta_server-0.3.0/src/ducta_server/models/workspace.py +68 -0
- ducta_server-0.3.0/src/ducta_server/repositories/__init__.py +33 -0
- ducta_server-0.3.0/src/ducta_server/repositories/config_repository.py +87 -0
- ducta_server-0.3.0/src/ducta_server/repositories/dataset_repository.py +84 -0
- ducta_server-0.3.0/src/ducta_server/repositories/node_repository.py +169 -0
- ducta_server-0.3.0/src/ducta_server/repositories/project_repository.py +223 -0
- ducta_server-0.3.0/src/ducta_server/routes/__init__.py +116 -0
- ducta_server-0.3.0/src/ducta_server/routes/ai.py +1533 -0
- ducta_server-0.3.0/src/ducta_server/routes/auth.py +234 -0
- ducta_server-0.3.0/src/ducta_server/routes/certificates.py +337 -0
- ducta_server-0.3.0/src/ducta_server/routes/certificates_standalone.py +110 -0
- ducta_server-0.3.0/src/ducta_server/routes/configs.py +127 -0
- ducta_server-0.3.0/src/ducta_server/routes/editor.py +218 -0
- ducta_server-0.3.0/src/ducta_server/routes/environments.py +60 -0
- ducta_server-0.3.0/src/ducta_server/routes/execution.py +661 -0
- ducta_server-0.3.0/src/ducta_server/routes/git.py +470 -0
- ducta_server-0.3.0/src/ducta_server/routes/health.py +96 -0
- ducta_server-0.3.0/src/ducta_server/routes/ingestion.py +302 -0
- ducta_server-0.3.0/src/ducta_server/routes/mlops.py +785 -0
- ducta_server-0.3.0/src/ducta_server/routes/nodes.py +375 -0
- ducta_server-0.3.0/src/ducta_server/routes/projects.py +2061 -0
- ducta_server-0.3.0/src/ducta_server/routes/quality.py +331 -0
- ducta_server-0.3.0/src/ducta_server/routes/schedules.py +243 -0
- ducta_server-0.3.0/src/ducta_server/routes/sentinel.py +319 -0
- ducta_server-0.3.0/src/ducta_server/routes/templates.py +90 -0
- ducta_server-0.3.0/src/ducta_server/routes/workspace.py +212 -0
- ducta_server-0.3.0/src/ducta_server/routes/workspace_files.py +110 -0
- ducta_server-0.3.0/src/ducta_server/sentinel_hooks.py +102 -0
- ducta_server-0.3.0/src/ducta_server/services/__init__.py +36 -0
- ducta_server-0.3.0/src/ducta_server/services/alerts.py +202 -0
- ducta_server-0.3.0/src/ducta_server/services/column_lineage.py +96 -0
- ducta_server-0.3.0/src/ducta_server/services/comments.py +176 -0
- ducta_server-0.3.0/src/ducta_server/services/config_service.py +109 -0
- ducta_server-0.3.0/src/ducta_server/services/dataset_service.py +267 -0
- ducta_server-0.3.0/src/ducta_server/services/debugger.py +57 -0
- ducta_server-0.3.0/src/ducta_server/services/dependency_graph.py +98 -0
- ducta_server-0.3.0/src/ducta_server/services/failing_rows.py +89 -0
- ducta_server-0.3.0/src/ducta_server/services/governance.py +47 -0
- ducta_server-0.3.0/src/ducta_server/services/language_server.py +168 -0
- ducta_server-0.3.0/src/ducta_server/services/node_schema_service.py +661 -0
- ducta_server-0.3.0/src/ducta_server/services/node_service.py +148 -0
- ducta_server-0.3.0/src/ducta_server/services/project.py +324 -0
- ducta_server-0.3.0/src/ducta_server/services/run_scope.py +118 -0
- ducta_server-0.3.0/src/ducta_server/services/streaming_status.py +183 -0
- ducta_server-0.3.0/src/ducta_server/source/__init__.py +24 -0
- ducta_server-0.3.0/src/ducta_server/source/models.py +61 -0
- ducta_server-0.3.0/src/ducta_server/source/resolver.py +504 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/ActionButton-kL03FQ2i.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/CertificateDetail-B6QRVMeI.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/CertificateDetailPage-DjQlIin9.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/CertificateSections-BZICaIwa.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/CertificateSections-sU1iHdUk.js +2 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/CodeEditor-MlTT04Rw.js +9 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/FileTree-jQ6i98-_.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/FilterBar-Oyw3GZGv.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/FilterBar-te8kxCSZ.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/GitPage-DGsyQW3r.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/IngestionPage-5A4F2Sps.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/Panel-CoT3zDqC.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/ProofLadder-5RJgQ7ET.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/ProofLadder-DATAMOcE.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/codicon-Brq4_Ui5.ttf +0 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/editor.worker-DysRFSaV.js +30 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-93v8b328.js +131 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BBFye_4w.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BEtV1dfZ.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BEtdT9U0.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BSQ6jwMx.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BVUNFwIa.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BbLgjmgV.js +77 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-BtsDKMoO.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-Bvj4SUOR.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-CLpXfs-i.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-CVeHE6ei.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-CZfAH89o.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-CdKZe4_f.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-ChqQ3tnU.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-CkkSUVtg.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-D3Z_1VkX.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-DUZdjah8.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-DsTsJ4ed.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-DwvqxiFI.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-bq55Wk3V.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-dYu-JeBg.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-kHeFF8A1.js +2 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/index-roGthpRu.js +3 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/logs.worker-CKRqtDrK.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/ruff.worker-Pn1acVS8.js +2 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/ruff_wasm_bg-2HTd4DnX.wasm +0 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/runTable-CZbB9xvZ.js +3 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/sentinel-DQryvMwS.js +2 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/sentinel-I3uqIsSp.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-flow-BnuhLJ6X.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-flow-CV9Ftu0i.js +23 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-icons-DAUJAxcJ.js +706 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-monaco-CpGl8Q5g.js +938 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-monaco-D3ZwOKMO.css +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-query-B70khrVF.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-react-5SITLlro.js +40 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-router-4-t7cDf-.js +13 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-state-DwFxpK3F.js +1 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/vendor-utils-SMENmlR2.js +40 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/assets/yaml.worker-DaKGPvBV.js +471 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/favicon.svg +11 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/fonts/Inter-Variable.woff2 +0 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/fonts/JetBrainsMono-Variable.woff2 +0 -0
- ducta_server-0.3.0/src/ducta_server/ui_dist/index.html +29 -0
- ducta_server-0.3.0/src/ducta_server/utils/__init__.py +19 -0
- ducta_server-0.3.0/src/ducta_server/utils/audit.py +78 -0
- ducta_server-0.3.0/src/ducta_server/utils/fsio.py +55 -0
- ducta_server-0.3.0/src/ducta_server/utils/git_utils.py +127 -0
- ducta_server-0.3.0/src/ducta_server/utils/logging.py +55 -0
- ducta_server-0.3.0/src/ducta_server/utils/pagination.py +38 -0
- ducta_server-0.3.0/src/ducta_server/utils/platform_utils.py +83 -0
- ducta_server-0.3.0/src/ducta_server/utils/validators.py +134 -0
- ducta_server-0.3.0/src/ducta_server/workspace/__init__.py +23 -0
- ducta_server-0.3.0/src/ducta_server/workspace/manager.py +445 -0
- ducta_server-0.3.0/src/ducta_server/workspace/preflight.py +360 -0
- ducta_server-0.3.0/src/ducta_server/workspace/utils.py +34 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ducta-server
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Ducta's web server: the REST API and the web app for Ducta data pipelines.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: data-pipeline,etl,spark,web-ui,rest-api,ducta
|
|
8
|
+
Author: Faustino Lopez Ramos
|
|
9
|
+
Author-email: faustinolopezramos@gmail.com
|
|
10
|
+
Maintainer: Faustino Lopez Ramos
|
|
11
|
+
Maintainer-email: faustinolopezramos@gmail.com
|
|
12
|
+
Requires-Python: >=3.11,<3.15
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Web Environment
|
|
15
|
+
Classifier: Framework :: FastAPI
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
25
|
+
Requires-Dist: GitPython (>=3.1.0,<4.0.0)
|
|
26
|
+
Requires-Dist: PyJWT (>=2.8.0,<3.0.0)
|
|
27
|
+
Requires-Dist: aiosqlite (>=0.20.0,<1.0.0)
|
|
28
|
+
Requires-Dist: alembic (>=1.14.0,<2.0.0)
|
|
29
|
+
Requires-Dist: asyncpg (>=0.30.0,<1.0.0)
|
|
30
|
+
Requires-Dist: bcrypt (>=4.0.0,<6.0.0)
|
|
31
|
+
Requires-Dist: ducta (>=0.3.0,<0.4.0)
|
|
32
|
+
Requires-Dist: fastapi (>=0.104.0,<1.0.0)
|
|
33
|
+
Requires-Dist: msgpack (>=1.0.0,<2.0.0)
|
|
34
|
+
Requires-Dist: psycopg2-binary (>=2.9.0,<3.0.0)
|
|
35
|
+
Requires-Dist: redis (>=5.0.0,<9.0.0)
|
|
36
|
+
Requires-Dist: ruamel.yaml (>=0.18,<0.20)
|
|
37
|
+
Requires-Dist: sqlalchemy[asyncio] (>=2.0.0,<3.0.0)
|
|
38
|
+
Requires-Dist: uvicorn[standard] (>=0.23.0,<1.0.0)
|
|
39
|
+
Project-URL: Changelog, https://github.com/faustinolopezramos/ducta/blob/main/CHANGELOG.md
|
|
40
|
+
Project-URL: Documentation, https://github.com/faustinolopezramos/ducta/tree/main/docs
|
|
41
|
+
Project-URL: Homepage, https://github.com/faustinolopezramos/ducta
|
|
42
|
+
Project-URL: Issues, https://github.com/faustinolopezramos/ducta/issues
|
|
43
|
+
Project-URL: Repository, https://github.com/faustinolopezramos/ducta
|
|
44
|
+
Project-URL: Source, https://github.com/faustinolopezramos/ducta
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# ducta-server
|
|
48
|
+
|
|
49
|
+
Ducta's web server: the REST/WebSocket API and the web app, on one port.
|
|
50
|
+
|
|
51
|
+
[Ducta](https://github.com/faustinolopezramos/ducta) is a configuration-as-code
|
|
52
|
+
framework for batch, streaming, ML and hybrid data pipelines. It comes in two
|
|
53
|
+
packages, from the same repository and always at the same version:
|
|
54
|
+
|
|
55
|
+
| You want… | Install | Then |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| The command line only | `pip install ducta` | `ducta start`, `ducta check`… |
|
|
58
|
+
| The web app | `pip install ducta-server` | `ducta-server` |
|
|
59
|
+
| Both | `pip install ducta ducta-server` | both; `ducta ui` starts the web app too |
|
|
60
|
+
|
|
61
|
+
`ducta-server` installs `ducta` (the engine that runs your pipelines) with it.
|
|
62
|
+
Add the engine's extras the same way you would without the server, for example
|
|
63
|
+
Spark and the AI assistant:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install ducta-server "ducta[spark,ai]"
|
|
67
|
+
ducta-server # http://127.0.0.1:8000, opens a browser
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Options: `--host`, `--port`, `--no-browser`, `--source <workspace>`,
|
|
71
|
+
`--db <sqlite file>` and `--allow-unauthenticated`. Run `ducta-server --help`.
|
|
72
|
+
|
|
73
|
+
On an address other than this machine's, the server refuses to start without
|
|
74
|
+
authentication (`AUTH_ENABLED=true` and a `JWT_SECRET_KEY`): it runs pipelines,
|
|
75
|
+
so reaching it is reaching code execution.
|
|
76
|
+
|
|
77
|
+
Documentation: <https://github.com/faustinolopezramos/ducta/tree/main/docs>
|
|
78
|
+
(see *Server & API* and *Deployment*). License: Apache-2.0.
|
|
79
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ducta-server
|
|
2
|
+
|
|
3
|
+
Ducta's web server: the REST/WebSocket API and the web app, on one port.
|
|
4
|
+
|
|
5
|
+
[Ducta](https://github.com/faustinolopezramos/ducta) is a configuration-as-code
|
|
6
|
+
framework for batch, streaming, ML and hybrid data pipelines. It comes in two
|
|
7
|
+
packages, from the same repository and always at the same version:
|
|
8
|
+
|
|
9
|
+
| You want… | Install | Then |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| The command line only | `pip install ducta` | `ducta start`, `ducta check`… |
|
|
12
|
+
| The web app | `pip install ducta-server` | `ducta-server` |
|
|
13
|
+
| Both | `pip install ducta ducta-server` | both; `ducta ui` starts the web app too |
|
|
14
|
+
|
|
15
|
+
`ducta-server` installs `ducta` (the engine that runs your pipelines) with it.
|
|
16
|
+
Add the engine's extras the same way you would without the server, for example
|
|
17
|
+
Spark and the AI assistant:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install ducta-server "ducta[spark,ai]"
|
|
21
|
+
ducta-server # http://127.0.0.1:8000, opens a browser
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Options: `--host`, `--port`, `--no-browser`, `--source <workspace>`,
|
|
25
|
+
`--db <sqlite file>` and `--allow-unauthenticated`. Run `ducta-server --help`.
|
|
26
|
+
|
|
27
|
+
On an address other than this machine's, the server refuses to start without
|
|
28
|
+
authentication (`AUTH_ENABLED=true` and a `JWT_SECRET_KEY`): it runs pipelines,
|
|
29
|
+
so reaching it is reaching code execution.
|
|
30
|
+
|
|
31
|
+
Documentation: <https://github.com/faustinolopezramos/ducta/tree/main/docs>
|
|
32
|
+
(see *Server & API* and *Deployment*). License: Apache-2.0.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# ducta-server: Ducta's web server — the REST/WebSocket API and the web app.
|
|
3
|
+
#
|
|
4
|
+
# A separate distribution from `ducta` (the engine and the CLI, at the repo
|
|
5
|
+
# root), built from the same repository and released with the same version.
|
|
6
|
+
# It depends on `ducta`; `ducta` never depends on it. `pip install ducta-server`
|
|
7
|
+
# installs both.
|
|
8
|
+
# ==============================================================================
|
|
9
|
+
[tool.poetry]
|
|
10
|
+
name = "ducta-server"
|
|
11
|
+
version = "0.3.0"
|
|
12
|
+
description = "Ducta's web server: the REST API and the web app for Ducta data pipelines."
|
|
13
|
+
authors = ["Faustino Lopez Ramos <faustinolopezramos@gmail.com>"]
|
|
14
|
+
maintainers = ["Faustino Lopez Ramos <faustinolopezramos@gmail.com>"]
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
license = "Apache-2.0"
|
|
17
|
+
homepage = "https://github.com/faustinolopezramos/ducta"
|
|
18
|
+
repository = "https://github.com/faustinolopezramos/ducta"
|
|
19
|
+
documentation = "https://github.com/faustinolopezramos/ducta/tree/main/docs"
|
|
20
|
+
keywords = ["data-pipeline", "etl", "spark", "web-ui", "rest-api", "ducta"]
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 3 - Alpha",
|
|
23
|
+
"Environment :: Web Environment",
|
|
24
|
+
"Framework :: FastAPI",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"License :: OSI Approved :: Apache Software License",
|
|
27
|
+
"Operating System :: OS Independent",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3.11",
|
|
30
|
+
"Programming Language :: Python :: 3.12",
|
|
31
|
+
"Programming Language :: Python :: 3.13",
|
|
32
|
+
"Programming Language :: Python :: 3.14",
|
|
33
|
+
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
packages = [
|
|
37
|
+
{ include = "ducta_server", from = "src" },
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
# The built web app (`npm run build` in server/ui writes it here). Gitignored:
|
|
41
|
+
# it exists only once the UI is built, which the release workflow checks.
|
|
42
|
+
include = [
|
|
43
|
+
{ path = "src/ducta_server/ui_dist", format = ["sdist", "wheel"] },
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
exclude = [
|
|
47
|
+
"src/ducta_server/**/__pycache__",
|
|
48
|
+
"**/.DS_Store",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[tool.poetry.urls]
|
|
52
|
+
"Source" = "https://github.com/faustinolopezramos/ducta"
|
|
53
|
+
"Issues" = "https://github.com/faustinolopezramos/ducta/issues"
|
|
54
|
+
"Changelog" = "https://github.com/faustinolopezramos/ducta/blob/main/CHANGELOG.md"
|
|
55
|
+
|
|
56
|
+
[tool.poetry.dependencies]
|
|
57
|
+
python = ">=3.11,<3.15"
|
|
58
|
+
|
|
59
|
+
# The engine, at least this server's own version and within its minor: the server
|
|
60
|
+
# runs it in-process and in child processes and uses its public API, which a
|
|
61
|
+
# patch release may extend (an older patch of the engine may lack what it calls).
|
|
62
|
+
ducta = ">=0.3.0,<0.4.0"
|
|
63
|
+
|
|
64
|
+
fastapi = ">=0.104.0,<1.0.0"
|
|
65
|
+
msgpack = "^1.0.0"
|
|
66
|
+
# ">=x,<1", not "^0.x": a caret on 0.x pins the minor (uvicorn stayed on 0.23).
|
|
67
|
+
uvicorn = { version = ">=0.23.0,<1.0.0", extras = ["standard"] }
|
|
68
|
+
# PyJWT rather than python-jose: python-jose pulls in `ecdsa`, whose Minerva
|
|
69
|
+
# timing vulnerability (CVE-2024-23342) is unfixable in pure Python and has no
|
|
70
|
+
# planned patch. Ducta only ever signs with HS256. PyJWT delegates to `cryptography`.
|
|
71
|
+
PyJWT = "^2.8.0"
|
|
72
|
+
bcrypt = ">=4.0.0,<6.0.0"
|
|
73
|
+
|
|
74
|
+
# Execution history: SQLite by default, PostgreSQL when DATABASE_URL says so.
|
|
75
|
+
sqlalchemy = { version = "^2.0.0", extras = ["asyncio"] }
|
|
76
|
+
alembic = "^1.14.0"
|
|
77
|
+
aiosqlite = ">=0.20.0,<1.0.0"
|
|
78
|
+
asyncpg = ">=0.30.0,<1.0.0"
|
|
79
|
+
psycopg2-binary = "^2.9.0"
|
|
80
|
+
|
|
81
|
+
GitPython = "^3.1.0"
|
|
82
|
+
redis = ">=5.0.0,<9.0.0"
|
|
83
|
+
# Round-trip YAML: edits of format-2 projects keep the comments and key order of
|
|
84
|
+
# files people also edit by hand.
|
|
85
|
+
"ruamel.yaml" = ">=0.18,<0.20"
|
|
86
|
+
|
|
87
|
+
[tool.poetry.scripts]
|
|
88
|
+
ducta-server = "ducta_server.cli:main"
|
|
89
|
+
|
|
90
|
+
[build-system]
|
|
91
|
+
requires = ["poetry-core>=1.0.0"]
|
|
92
|
+
build-backend = "poetry.core.masonry.api"
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Ducta server (`ducta_server`)
|
|
2
|
+
|
|
3
|
+
> **The REST + WebSocket server of Ducta.** Built on **FastAPI**, it exposes pipeline configuration, execution, git history, data quality, MLOps, and workspace management over HTTP — and serves the bundled web UI. Sources (local paths or Git URLs) are provided per request, so one server can drive many projects.
|
|
4
|
+
|
|
5
|
+
## At a glance
|
|
6
|
+
|
|
7
|
+
| | |
|
|
8
|
+
|---|---|
|
|
9
|
+
| **Purpose** | Expose Ducta over HTTP/WS for tools, automation, and the web UI |
|
|
10
|
+
| **Layer** | Interface (service) |
|
|
11
|
+
| **Depends on** | `core`, `setting`, `console` (presentation, `ConsoleReporter`), `ai`, `check`, `mlrun`, `stream`, `gate`; optional SQLAlchemy persistence |
|
|
12
|
+
| **Used by** | the web app (`server/ui`) and any external HTTP client; `ducta ui` starts it when this package is installed |
|
|
13
|
+
| **Key entry points** | `create_app()` / `ducta_server.main:app`, routers under `/api`, `ducta server start` |
|
|
14
|
+
| **Install** | `pip install ducta-server` (a separate distribution; it installs `ducta` at the same version) |
|
|
15
|
+
|
|
16
|
+
## Where it fits
|
|
17
|
+
|
|
18
|
+
```mermaid
|
|
19
|
+
flowchart TD
|
|
20
|
+
console["console · CLI"] --> core
|
|
21
|
+
api["api · REST / WebSocket"] --> core
|
|
22
|
+
ui["ui · Web UI"] --> api
|
|
23
|
+
setting["setting · Config foundation"] --> core["core · Orchestration"]
|
|
24
|
+
core --> gate["gate · Data I/O"]
|
|
25
|
+
core --> stream["stream · Streaming"]
|
|
26
|
+
core --> check["check · Data quality"]
|
|
27
|
+
core --> mlrun["mlrun · MLOps"]
|
|
28
|
+
style api fill:#4f46e5,stroke:#312e81,color:#fff
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 1. Overview
|
|
34
|
+
|
|
35
|
+
### For Non-Technical Users
|
|
36
|
+
Ducta API is the **backend brain** behind the web app and any automation. It lets tools and teammates — not just one person at a terminal — start pipelines, watch them run live, browse configuration, review data-quality results, and manage models, all through a standard web interface with optional login.
|
|
37
|
+
|
|
38
|
+
### For Technical Users
|
|
39
|
+
Ducta API is the service layer, implementing:
|
|
40
|
+
* **App factory & lifespan**: `create_app()` wires middleware, routes, exception handlers, optional DB persistence + migrations, the execution manager, and a config cache; it warns when bound to a non-local address without auth (`main.py`).
|
|
41
|
+
* **Routers under `/api`**: auth, workspace (+ files), projects, nodes, configs, environments, executions (+ WebSocket log streaming), certificates, schedules, git, mlops, quality, ingestion and templates, plus unauthenticated health probes (`routes/`).
|
|
42
|
+
* **Optional JWT auth**: `AuthService` (bcrypt password hashing, jose-signed HS256 tokens with type/expiry checks); production settings refuse the default secret and require `auth_enabled` (`auth/`, `config.py`).
|
|
43
|
+
* **Execution engine**: an in-memory `ExecutionManager` with a bounded queue, concurrent-run limits, log buffering, and optional DB-backed persistence layered transparently (`execution/`).
|
|
44
|
+
* **Source resolution with SSRF defense**: per-request local paths are security-validated; Git clones are host-allow-listed and reject internal/non-routable targets (loopback, private, link-local metadata endpoint) (`source/resolver.py`).
|
|
45
|
+
* **Persistence & repositories**: optional SQLAlchemy-async engine, Alembic-style migrations, and repository/store abstractions for projects, nodes, and execution history (`db/`, `repositories/`, `repository/`).
|
|
46
|
+
* **Project files**: `ducta.project_store` (`store.py`, `V2ProjectStore`; the engine's package, shared with the CLI and `ducta ai`) reads and writes a project's `ducta.yaml`, `catalog.yaml` and `pipelines/*.yaml` in place — comments and key order kept — validates every edit against every environment before keeping it, and does **not** commit (committing is the user's call: the Changes panel, or git). The optimistic-concurrency token, still named `commit_sha`, is a hash of the file's content (`content_version` in `ducta/project_store/fileops.py`). A workspace is one project or a `projects/<id>/` directory of them (`workspace_stores`).
|
|
47
|
+
* **Middleware**: request-ID tagging, CORS, and configurable per-IP rate limiting (in-memory or Redis) (`middleware/`).
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 2. Configuration
|
|
52
|
+
|
|
53
|
+
Settings come from environment variables (Pydantic `Settings`, `config.py`). Key variables:
|
|
54
|
+
|
|
55
|
+
| Variable | Default | Purpose |
|
|
56
|
+
|----------|---------|---------|
|
|
57
|
+
| `HOST` / `PORT` | `127.0.0.1` / `8000` | Bind address (non-local without auth triggers a warning) |
|
|
58
|
+
| `ENVIRONMENT` | `development` | `production` enforces auth + a non-default JWT secret |
|
|
59
|
+
| `AUTH_ENABLED` | `false` | Require JWT authentication |
|
|
60
|
+
| `JWT_SECRET_KEY` | `change-me-in-production` | HS256 signing key (must be overridden in prod, and with auth on at any non-loopback `HOST`; `DUCTA_ADMIN_PASSWORD` too) |
|
|
61
|
+
| `JWT_EXPIRATION_HOURS` | `24` | Access-token lifetime |
|
|
62
|
+
| `DATABASE_URL` | `""` (in-memory) | `sqlite+aiosqlite:///...` or `postgresql+asyncpg://...` |
|
|
63
|
+
| `RUNS_DIR` | `~/.ducta/runs` | Where the file-based execution store writes `meta.json` + `logs.jsonl` per run. Empty disables file persistence (memory-only) |
|
|
64
|
+
| `RATE_LIMIT_ENABLED` | `false` | Per-IP rate limiting (`RATE_LIMIT_REQUESTS`, `..._WINDOW_SECONDS`, `RATE_LIMIT_REDIS_URL`) |
|
|
65
|
+
| `MAX_CONCURRENT_EXECUTIONS` | `5` | Parallel pipeline runs |
|
|
66
|
+
| `RUN_ISOLATION` | `auto` | `process` (each run in its own process, without the server's secrets), `thread` (inside the server, one at a time) or `auto` (`process` when `AUTH_ENABLED=true`) |
|
|
67
|
+
| `ALLOWED_HOSTS` | `[]` | Host names the server answers to besides `localhost`/`127.0.0.1`/`::1` (DNS-rebinding guard); unset while bound to `0.0.0.0` = no check, with a startup warning |
|
|
68
|
+
| `CORS_ORIGINS` | `localhost`/`127.0.0.1` on ports 5173 and 4173 (the Vite dev/preview servers) | Allowed origins. Keep it an explicit list: `*` forces credentials off |
|
|
69
|
+
| `GIT_CLONE_ALLOWED_HOSTS` | `[]` | Allow-list for Git clone hosts. Empty = the well-known public forges outside `development`, any host in `development` |
|
|
70
|
+
| `LSP_COMMAND` / `LSP_MAX_PROCESSES` | `""` / `4` | Python language server for the code editor, one per open editor over stdio. Empty = the first found of `basedpyright-langserver`, `pyright-langserver`, `pylsp`; `off` disables it |
|
|
71
|
+
| `SLA_CHECK_MINUTES` / `SLA_CHECK_ENV` | `0` / `prod` | Check every project's `metadata.sla` this often and send `sla_miss` alerts. `0` = off (`POST /api/projects/{id}/alerts/check` still works) |
|
|
72
|
+
|
|
73
|
+
**Roles and permissions** (with `AUTH_ENABLED=true`; with auth off every request runs as a local admin):
|
|
74
|
+
|
|
75
|
+
| Role | Permissions |
|
|
76
|
+
|------|-------------|
|
|
77
|
+
| `admin` | `*` |
|
|
78
|
+
| `operator` | read, plus run pipelines (`pipeline.execute`, `pipeline.execute.protected`), `execution.write` and `quality.run` — runs what is there, including in protected environments, but does not change projects or code |
|
|
79
|
+
| `developer` | read + write on workspace, configs, pipelines, nodes, datasets, Git, repositories, executions, projects, quality, ingestion, templates; `pipeline.execute`, `quality.run`, `git.revert`, `model.promote`, `model.delete` |
|
|
80
|
+
| `viewer` | read only (`*.read`, including `project.read`) |
|
|
81
|
+
|
|
82
|
+
Some routes need more than their name suggests:
|
|
83
|
+
- The preflight and the stream plan (`POST .../pipelines/{name}/stream-plan`) need `pipeline.execute`, because they import project code (in a subprocess).
|
|
84
|
+
- A Git URL as `source` needs `repository.write`, because the server clones it.
|
|
85
|
+
- Promoting a model needs `model.promote`; deleting a version or running gc needs `model.delete`.
|
|
86
|
+
- Testing an unsaved ingestion connection needs `ingestion.write`.
|
|
87
|
+
- Running or retrying in a protected environment (`governance.protected_environments` in `ducta.yaml`, `[prod, production]` by default) needs `pipeline.execute.protected`: operators and admins have it, developers do not.
|
|
88
|
+
|
|
89
|
+
`GET /api/auth/me` returns `roles` and `permissions`, and the UI uses them to hide or disable actions. `tests/server/test_rbac.py` fails if a route that writes is reachable by a viewer.
|
|
90
|
+
|
|
91
|
+
**Production checklist**: set `ENVIRONMENT=production`, `AUTH_ENABLED=true`, a strong `JWT_SECRET_KEY`, and either bind to `127.0.0.1` or place the server behind an authenticating proxy.
|
|
92
|
+
|
|
93
|
+
**Where execution history lives**: the Execution History page reads from two layers merged together — the in-memory `ExecutionStore` (capped by `max_executions_in_memory`, evicted after `execution_retention_seconds`, lost on restart) and the file-based store at `RUNS_DIR` (persists across restarts). Setting `DATABASE_URL` adds a third, queryable layer used for single-run/log lookups once a record has aged out of both memory and `RUNS_DIR`. To fully clear history, delete `RUNS_DIR` (and the `executions`/`execution_logs` tables if `DATABASE_URL` is set) — restarting the server alone only clears memory. This is independent of Data Quality's storage, which lives under `<output_path>/<environment>/quality` (or `settings.quality.output.base_path`), not under `RUNS_DIR`.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 3. Running the Server
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Via the CLI (launches this API + serves the UI)
|
|
101
|
+
ducta server start --host 127.0.0.1 --port 8000
|
|
102
|
+
ducta ui --port 8000 # same server, opens a browser
|
|
103
|
+
|
|
104
|
+
# Directly with uvicorn
|
|
105
|
+
uvicorn ducta_server.main:app --host 127.0.0.1 --port 8000
|
|
106
|
+
|
|
107
|
+
# Production-style env
|
|
108
|
+
export ENVIRONMENT=production
|
|
109
|
+
export AUTH_ENABLED=true
|
|
110
|
+
export JWT_SECRET_KEY="$(openssl rand -hex 32)"
|
|
111
|
+
export DATABASE_URL="postgresql+asyncpg://user:pass@localhost:5432/ducta"
|
|
112
|
+
uvicorn ducta_server.main:app --host 0.0.0.0 --port 8000 --workers 4
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Interactive docs are served at `/docs` (Swagger) and `/redoc`; the OpenAPI schema at `/openapi.json`.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 4. HTTP Quickstart
|
|
120
|
+
|
|
121
|
+
All application endpoints are under the `/api` prefix. Sources are passed per request.
|
|
122
|
+
|
|
123
|
+
### Step 1: Health check (no auth)
|
|
124
|
+
```bash
|
|
125
|
+
curl http://127.0.0.1:8000/health
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Step 2: Authenticate (when AUTH_ENABLED=true)
|
|
129
|
+
```bash
|
|
130
|
+
TOKEN=$(curl -s -X POST http://127.0.0.1:8000/api/auth/login \
|
|
131
|
+
-H "Content-Type: application/json" \
|
|
132
|
+
-d '{"username":"admin","password":"admin"}' | jq -r .access_token)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Step 3: Connect to a source and inspect configs
|
|
136
|
+
```bash
|
|
137
|
+
# Resolve a source (local path, or a Git URL to clone)
|
|
138
|
+
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
|
|
139
|
+
http://127.0.0.1:8000/api/workspace/select -d '{"path_or_url":"/path/to/project"}'
|
|
140
|
+
|
|
141
|
+
# List configs for an environment
|
|
142
|
+
curl -H "Authorization: Bearer $TOKEN" \
|
|
143
|
+
"http://127.0.0.1:8000/api/configs/dev?source=/path/to/project"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Step 4: Execute a pipeline
|
|
147
|
+
```bash
|
|
148
|
+
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
|
|
149
|
+
http://127.0.0.1:8000/api/projects/{project_id}/pipelines/sales_daily/execute \
|
|
150
|
+
-d '{"env":"dev"}'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Step 5: Manage runs and stream logs
|
|
154
|
+
```bash
|
|
155
|
+
# List / cancel / retry executions
|
|
156
|
+
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8000/api/executions
|
|
157
|
+
curl -X POST -H "Authorization: Bearer $TOKEN" \
|
|
158
|
+
http://127.0.0.1:8000/api/executions/{execution_id}/cancel
|
|
159
|
+
```
|
|
160
|
+
```
|
|
161
|
+
# Live log stream over WebSocket
|
|
162
|
+
ws://127.0.0.1:8000/api/ws/logs/{execution_id}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Programmatic (ASGI / tests)
|
|
166
|
+
```python
|
|
167
|
+
from fastapi.testclient import TestClient
|
|
168
|
+
from ducta_server.main import app
|
|
169
|
+
|
|
170
|
+
client = TestClient(app)
|
|
171
|
+
assert client.get("/health").status_code == 200
|
|
172
|
+
```
|