Skip to main content

Juntai Fuse API

Juntai Fuse API is the production API framework for registering one application handler surface and projecting it through supported protocol adapters.

The package contains:

  • endpoint and entity-endpoint registration;
  • the shared invocation and lifecycle kernel;
  • HTTP and generated-gRPC production adapters;
  • OpenAPI and protobuf generation;
  • versioned, transport-neutral descriptor models; and
  • exact dependency profiles for each supported adapter.

It does not provide application-specific contracts, identity, readiness, descriptor storage, entity storage, or simulated platform providers. Applications must supply their own resolver backed by their production data adapter.

Runtime setup

Install the package with the adapter extra used by the service:

uv add 'juntai-fuse-api[http]>=1,<2'
uv add 'juntai-fuse-api[grpc-generated]>=1,<2'

Select the versioned runtime profile and build a server. The shorthand is resolved against the package-owned compatibility matrix and still fails closed when an optional dependency is absent or outside its supported window:

from juntai.sdk.fuse_api import EndpointGroup, FuseServer, select_profile

profile = select_profile("juntai.fuse.profile.http/v1")

items = EndpointGroup("items", prefix="/items")

@items.endpoint(method="GET", path="/{item_id}", protocols=["http"])
async def get_item(item_id: str) -> dict[str, str]:
    return {"item_id": item_id}

server = FuseServer(profile=profile)
server.register(items)
server.enable_http()

The framework exposes stable implementation namespaces under decorators/, invocation/, models/, middleware/, protocols/, generation/, and testing/. The legacy top-level imports remain aliases to those same objects; there is no second invocation path or adapter implementation.

Service-owned OpenAPI artifacts

Generate release artifacts from the service composition root. The service supplies its own stable identity, version, source commit, endpoint groups, and output root; FuseAPI supplies only deterministic generation mechanics.

from juntai.sdk.fuse_api import OpenAPIArtifactGenerator, ServiceArtifactIdentity

bundle = OpenAPIArtifactGenerator().generate(
    [items],
    identity=ServiceArtifactIdentity(
        service="inventory-service",
        version="1.4.0",
        source_commit="0123456789abcdef0123456789abcdef01234567",
    ),
    title="Inventory Service",
)
bundle.write_to(".")

This writes contracts/openapi/inventory-service.v1.json, its .sha256 file, and contracts/openapi/generation-manifest.json. Serialization is canonical, the manifest contains no wall-clock timestamp, and compatibility checks are available through compare_openapi and assert_openapi_compatible. These files belong to the service repository and are not copied into FuseAPI.

For entity endpoints, implement EntityResolver or wrap an application-owned production lookup with CallableEntityResolver.

Development

uv sync --all-groups --all-extras
uv run pytest
uv run ruff check src tests scripts
uv build

scripts/verify_profile_packaging.py verifies that packaged extras match the versioned profile matrix. scripts/verify_artifacts.py validates wheel and source distribution contents and checksum provenance.

The exact two-repository CI workspace is locked by ci/uv.lock. scripts/bootstrap_ci_workspace.py verifies the pinned Observability checkout and copies that committed lock into the generated workspace before Jumbo runs. The released wheel declares the public juntai-observability-python>=2.0.1,<3.0.0 distribution so clean service environments resolve every runtime dependency from PyPI.

Releases

The canonical version lives in pyproject.toml. A reviewed version change on main runs .github/workflows/publish-python.yml, builds the wheel and source distribution once, publishes those exact files through PyPI Trusted Publishing, and creates the matching immutable v<version> GitHub release. Publication uses the protected pypi GitHub environment and short-lived OIDC credentials; no PyPI API token is stored in GitHub.

Production boundary

Run the repository-wide fail-closed check before dependency setup:

python scripts/check_production_boundary.py

The command scans every path in the Git index. It has no file allowlist or baseline exemption, so source, tests, conformance, integration, examples, documentation commands, container definitions, CI, and acceptance artifacts are all covered whenever present. The test suite includes negative cases proving that every delivery surface is rejected consistently and that an incomplete scan fails closed.

Download files

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

Source Distribution

juntai_fuse_api-1.0.0.tar.gz (199.6 kB view details)

Uploaded Source

Built Distribution

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

juntai_fuse_api-1.0.0-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

Details for the file juntai_fuse_api-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for juntai_fuse_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 174656ac03470c56890b40de2da19bf3cb998d4495cf3d6f457206208fc2eab5
MD5 fc10e55a5028af41e209883e54fcb251
BLAKE2b-256 9fa210e71fff53464ed702b191cfe6617bac0873582c38f87ea3ee7a2aff0178

See more details on using hashes here.

Provenance

The following attestation bundles were made for juntai_fuse_api-1.0.0.tar.gz:

Publisher: publish-python.yml on zephytiju/JuntaiFuseAPI

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_fuse_api-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: juntai_fuse_api-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 73.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for juntai_fuse_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 217c12648f4c8dce974e14c3bb04ba79e239326c54d793f3d7e2ace445807eb9
MD5 7c09d9ffd3f8ef3d72c5f3e7918b3e89
BLAKE2b-256 e0ff083f7a80e83c05b21bd002d9eb67a6a42ecb533d9e9cbe31ee617e157b34

See more details on using hashes here.

Provenance

The following attestation bundles were made for juntai_fuse_api-1.0.0-py3-none-any.whl:

Publisher: publish-python.yml on zephytiju/JuntaiFuseAPI

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

Release history Release notifications | RSS feed

2.0.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

This release

1.0.0 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