Skip to main content

Juntai Artifact Client

juntai-artifact-client is the backend Python client for immutable, OCI-backed Juntai artifacts. It consumes Artifact Registry's pinned juntai.registry.artifact.v1 Protobuf contract through generated gRPC stubs. Artifact bytes move directly between backend Python code and OCI; Artifact Registry receives metadata only over authenticated internal gRPC.

Deterministic generation uses the immutable FuseAPI profile requirement juntai-fuse-api[grpc-generated]==1.1.2 (juntai.fuse.profile.grpc-generated v1.0.0), with grpcio-tools==1.81.1 and protobuf==6.33.6. The Registry—not FuseAPI or this client—owns the versioned .proto semantics. FuseAPI 1.1.2 is consumed only as its normal public PyPI requirement from source commit 198ada7436bffefdd035f92d7e5158283f9b14f0.

Install

python -m pip install "juntai-artifact-client>=1,<2"

Stable imports are under juntai.artifact. Generated stubs are an internal implementation detail under juntai.artifact.generated.juntai.registry.artifact.v1.

from juntai.artifact import ArtifactClient, ArtifactLayer
from juntai.artifact.oci import OrasOCITransport

oci = OrasOCITransport(
    registry=internal_oci_registry,
    repository_prefix="juntai/artifacts",
    client=oras_client,
)

artifacts = ArtifactClient.connect(
    registry_target="dns:///artifact-registry.platform.svc:7443",
    registry_credentials=workload_or_mtls_credentials,
    oci=oci,
)
published = artifacts.publish(
    namespace="lattice",
    name="fraud-ontology",
    kind="lattice.ontology",
    version="3.2.0",
    layers=[
        ArtifactLayer(
            media_type="application/vnd.juntai.lattice.ontology.v1+json",
            data=ontology_bytes,
        )
    ],
    provenance={
        "producer_identity": "build/lattice",
        "source_revision": git_sha,
        "build_id": build_id,
        "created_at": "2026-08-13T12:00:00Z",
    },
    idempotency_key=request_id,
)

layers = artifacts.resolve_and_download(published.reference)

The publisher pushes every content-addressed blob and the canonical manifest before registering metadata. The resolver pulls by the exact sha256 manifest digest and fails closed on digest, media-type, identity, or provenance mismatch. Metadata registration failure is classified as a partial failure and can be retried with the same idempotency key; an unreferenced OCI manifest may remain for ordinary registry retention.

A durable ArtifactReference preserves both Registry-issued identities: the stable artifact_id and the immutable version_id. Neither identity is collapsed into a generic resource ID, and exact resolution also verifies the tenant, owner, and manifest digest carried by that reference.

Channels and credentials remain behind the stable client. Workload identity or mTLS, explicit deadlines, cooperative cancellation, correlation IDs, idempotent retries, and canonical gRPC status translation are supported without exposing Registry or OCI capabilities to browser code.

This package intentionally has no REST/OpenAPI client, TypeScript/npm output, activation, deployment, rollback, database, service runtime, or domain-schema behavior.

The superseded distribution name juntai-artifact is not an alias and is never republished by this repository. The stable import remains juntai.artifact.

Verification

python -m pip install -e '.[dev]'
pytest -q
ruff check .
ruff format --check .
python -m build
python scripts/verify_clean_install.py dist

Acceptance requires both a real OCI Distribution-compatible registry and a real 01F Artifact Registry gRPC service. Fixture registries and in-memory metadata authorities are unit-test aids, not acceptance evidence.

The generated stubs are pinned to Artifact Registry v1.0.1 at source commit 0552d9f4a62d81d58452e1106b0e24d2b02c8700 and immutable Protobuf bundle oci://ghcr.io/zephytiju/juntai-artifact-registry-protobuf@sha256:d7da1ceedb1098f19e5f6dc77dbef41c5bc797caa8c92969a9b08a7e10ce736d. Artifact Registry v1.0.0 and earlier REST/OpenAPI releases are superseded and are not accepted as contract or release evidence.

Release and PyPI Trusted Publisher coordinates are documented in RELEASING.md. The canonical source repository is zephytiju/JuntaiArtifactClient; release evidence must use that exact owner/name rather than a redirect.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juntai_artifact_client-1.0.1.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

juntai_artifact_client-1.0.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file juntai_artifact_client-1.0.1.tar.gz.

File metadata

  • Download URL: juntai_artifact_client-1.0.1.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for juntai_artifact_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1100d379bb996d33e6fcaac41b3a8bd4ae53d448127b7e2d43a9a12714edc580
MD5 375bd6560355ab6a458d5452d27df5b7
BLAKE2b-256 7b8ee83db2eaf196fa5085db4b1696a212f6966fcf1327aa33136f86600f3d25

See more details on using hashes here.

Provenance

The following attestation bundles were made for juntai_artifact_client-1.0.1.tar.gz:

Publisher: publish.yml on zephytiju/JuntaiArtifactClient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file juntai_artifact_client-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for juntai_artifact_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a76da643920f7c1c90b88cc15dd4bfeba3a2d5e2ff9fda0b4f2a8539cdfe09
MD5 0bc7f76db1c4b9a1069e8a7cdcf3f608
BLAKE2b-256 2f43a6109b31247cfae335748ae6dc70fad9caca3ed809fbf828c0c7937816c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for juntai_artifact_client-1.0.1-py3-none-any.whl:

Publisher: publish.yml on zephytiju/JuntaiArtifactClient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.2

2 files

This release

1.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page