Metadata-Version: 2.5
Name: axiom-data-workflow
Version: 2.0.0
Summary: Core abstractions, base contracts, and payload containers for all user-defined and internal data workflows in the Axiom data pipeline.
Project-URL: Homepage, https://github.com/juntai/AxiomDataWorkflow
Project-URL: Repository, https://github.com/juntai/AxiomDataWorkflow.git
Author-email: Juntai Team <dev@juntai.com>
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: numpy>=1.24.0
Requires-Dist: polars>=1.0.0
Requires-Dist: pyarrow>=14.0.0
Requires-Dist: pydantic>=2.0.0
Description-Content-Type: text/markdown

# Axiom Data Workflow

[简体中文](README_zh.md) · [Development](DEVELOPMENT.md)

`axiom-data-workflow` is the public, application-neutral contract package for the
production Axiom workflow service. It defines immutable workflow revisions,
digest-addressed inputs and outputs, batch and Kafka ingestion requests, durable
execution observations, checkpoints, lineage, terminal receipts, and the
authenticated HTTP client.

The package contains no platform authority. Workflow, idempotency, execution,
checkpoint, lineage, receipt, evidence, and audit state is owned by the Axiom
service in KingbaseES (KES).

## Production contracts

Supported imports are available from `juntai.sdk.axiom.data_workflow`:

- `WorkflowRevisionCreate` and `WorkflowRevision` bind one canonical revision to
  an immutable application release, topology revision, and generic runtime digest.
- `IngestionRequest`, `ObjectReference`, and `KafkaRange` describe exact batch or
  bounded continuous inputs.
- `WorkflowExecution`, `ExecutionAttempt`, and `ExecutionState` expose durable
  execution and retry state.
- `WorkflowCheckpoint`, `LineageEdge`, and `ExecutionReceipt` expose recovery and
  value-free provenance evidence.
- `AxiomWorkflowClient` calls the authenticated production API and requires a
  request identity for every authorization/audit decision.

All revisions and receipts are validated against canonical SHA-256 identities.
Mutable runtime labels and unqualified object locations are rejected.

## Client example

```python
from juntai.sdk.axiom.data_workflow import AxiomWorkflowClient

client = AxiomWorkflowClient("https://axiom.internal", workload_token)
execution = client.get_execution(
    "tenant-1",
    "application-1",
    "execution-1",
    request_id="observe-execution-1",
)
receipt = client.get_receipt(
    "tenant-1",
    "application-1",
    execution.execution_id,
    request_id="receipt-execution-1",
)
```

Create and ingestion operations accept the typed request contracts plus an
idempotency key. Cancellation and replay use the execution resource endpoints and
preserve their request identities in the KES audit chain.

## Compatibility workflow abstractions

The earlier dataframe workflow abstractions remain lazy imports for existing
application packages. Importing production service contracts does not load Polars,
NumPy, or PyArrow. Scheduling, provider access, checkpointing, and execution stay
outside application workflow classes.

## Verification

```bash
python -m pytest
ruff check src tests scripts
python -m build
```

See the Axiom orchestrator repository for the production HTTP service, KES
migration, provider bindings, and live two-application acceptance.

## License

See [LICENSE](LICENSE).
