Skip to main content

Python SDK for Jammi AI Platform — the commercial managed audit-native AI platform

Project description

jammi-ai-platform

Python SDK for the Jammi AI Platform — the commercial managed audit-native AI platform. Talks to a Jammi SaaS endpoint via gRPC with bearer-token authentication.

Install

pip install jammi-ai-platform

Wheel-only distribution. Python 3.9+ on Linux / macOS / Windows.

Quickstart

import jammi_ai_platform as jap

with jap.Connection(url="https://api.jammi.cloud", api_key="jt_…") as conn:
    print(conn.tenant_id)         # resolved via WhoAmI at connect time
    print(conn.token_label)       # label of the bearer in use

    registry = jap.Registry(conn)
    model_id = registry.register_model("recall-q4", task="embedding")
    version_id = registry.register_version(
        model_id,
        jammi_model_id="bge-small-en-v1.5",
        source=jap.ManualSource(metric_name="recall_at_k", metric_value=0.92),
    )

    jap.Gate(conn).check(
        version_id,
        jap.GateConfig(
            gate_name="ship-gate",
            source_id="patents",
            golden_set="golden-1",
            k=10,
            rule=jap.ThresholdRule(
                metric_name=jap.MetricName.RECALL_AT_K,
                threshold=0.85,
                op=jap.ThresholdOp.GE,
            ),
        ),
    )

Use http://… / grpc://… instead of https://… / grpcs://… for local insecure development.

Configuration is typed

Every control-plane config is a typed builder, not an untyped dict: enums for the *_type/direction/op fields (so an invalid value is a construction error), and tagged-union variants dispatched by type — MaxIterationsBudget / WallClockBudget / NoImprovementBudget for an ExperimentConfig budget, EmbeddingTarget / InferenceTarget for a MonitorConfig target, ThresholdRule / RangeRule / WelchTTestRule / MannWhitneyURule / ParetoDominatesRule / CompoundRule for a gate Rule, and ExperimentIterationSource / ManualSource for a registry version source. The open JSON/Struct payloads — an experiment's search_space, a validation's perturbation_params, an evidence config_json — stay plain dicts.

Data plane (composed from jammi-client)

connect, RemoteDatabase, and BearerCredentials are re-exported from jammi-client: the embed / search / sql data plane comes from there, the control plane lives here, and both ride jammi-client's bearer transport.

The data plane and the control plane open separate sessions. A jap.Connection is bearer-scoped — it resolves a tenant via WhoAmI and vends the control-plane handles. jap.connect(target, credentials=...) opens its own RemoteDatabase session (jammi-session-id scoped) for the data plane. They are two independent connections, not one shared channel; open each explicitly.

Surface

  • Connection — control-plane gRPC channel + bearer auth, calls WhoAmI at connect
  • connect / RemoteDatabase — re-exported jammi-client data plane (embed / search / sql)
  • Registry — model + version + evidence catalog
  • Gate — quality-gate checks
  • Monitor — embedding / inference / divergence monitors + run streaming
  • Experiment — Bayesian / Grid / Random experiments
  • DeploymentBlocks — block / unblock sources from production traffic
  • Resilience — perturbation-based validation runs
  • Auth — issue / revoke / list API keys; WhoAmI
  • Tenants — read-only tenant directory lookup

Errors

status_to_exception (in jammi_ai_platform.errors) maps every gRPC status code to a typed Python exception. The hierarchy:

  • EnterpriseException
    • NotFoundError
    • AlreadyExistsError
    • TransitionNotAllowedError
    • TenantUnboundError
    • ConfigError
    • PermissionDeniedError

Docs

Full docs at https://docs.jammi.cloud.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

jammi_ai_platform-0.5.0-py3-none-any.whl (110.1 kB view details)

Uploaded Python 3

File details

Details for the file jammi_ai_platform-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jammi_ai_platform-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51fa82e978f30e6eb627e9b211a3482ba8538bafd124edf8dc5de1734acf21bc
MD5 e040f2448b5106d58449a15bc1cbf90a
BLAKE2b-256 3d01cea803f6deed31aa71c05a28ae11d6dbd91185b89cfe1eaa13dfe65d6b6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai_platform-0.5.0-py3-none-any.whl:

Publisher: sdk-pypi.yml on f-inverse/jammi-enterprise

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page