The Python client for a Jammi engine (import `jammi`) — one connect() for local (embedded) and remote targets
Project description
jammi-ai
The Python client (import jammi) for a Jammi
engine — one connect(target) for local (embedded) and remote targets.
jammi-ai is the base client: a universal py3-none-any wheel that
links no candle/ML stack — just grpcio + protobuf + pyarrow — for
production where the engine runs behind a server. It also discovers the compiled
in-process engine as an OPTIONAL backend: pip install jammi-ai[embedded]
pulls jammi-ai-native, and then connect("file://…") resolves the local target
to an in-process engine (direct FFI) through the SAME front door. Absent the
extra, the base stays native-free and a file:// target raises a truthful
NoEmbeddedEngineError.
One front door
import jammi
db = jammi.connect("https://engine.example.com")
db.add_source("patents", url="s3://corpus/patents.parquet", format="parquet")
db.generate_embeddings(source="patents", model="local:tiny_bert",
columns=["abstract"], key="id", modality="text")
q = db.encode_query(model="local:tiny_bert", query="quantum computing")
hits = db.search("patents", query=q, k=5) # -> pyarrow.Table
connect(target) is the Python mirror of the Rust Jammi::open(Target):
transport is config, not a code path.
Authenticated channels
A bearer-protected endpoint is reached by attaching credentials to the channel — the bearer rides the channel (attached once at connect), not threaded through every call:
from jammi import connect, BearerCredentials
db = connect("https://engine.example.com", credentials=BearerCredentials(token))
The same works on a plaintext grpc:// target for local development. The
channel-level bearer covers the typed gRPC verbs; db.sql() (the Flight SQL
lane) does not yet carry it — tracked at
issue #96.
| target | transport |
|---|---|
https://host / grpcs://host:8081 |
secure remote |
http://host / grpc://host:8081 |
plaintext remote |
file:///data |
in-process engine (direct FFI) with the [embedded] extra installed; otherwise raises NoEmbeddedEngineError pointing at pip install jammi-ai[embedded] |
Scaling local→remote is an env flip (connect(os.environ["JAMMI_TARGET"]))
with no code change. The lean deploy build and the embedded build are ONE
package — the same import jammi, connect unchanged — differing only by
whether the [embedded] extra is present.
Generated from the canonical proto
The wire stubs under jammi/_generated/ are generated from the same
jammi.v1 proto the engine, npm client, and embed wheel speak — one source, no
parallel schema. Regenerate after a proto change:
pip install -e '.[dev]'
make generate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jammi_ai-0.34.0-py3-none-any.whl.
File metadata
- Download URL: jammi_ai-0.34.0-py3-none-any.whl
- Upload date:
- Size: 143.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1f887fc7455acc9ba8e77a6c17cec63025d43ef728e835e68b15e673fe77fa1
|
|
| MD5 |
b12d39e48609a1fecf5f619cff42f848
|
|
| BLAKE2b-256 |
aa9f3fabc83e3c5b68240c47cd3fa5761d7cbfdcbfdeb94ec81e35a0efb5c9eb
|
Provenance
The following attestation bundles were made for jammi_ai-0.34.0-py3-none-any.whl:
Publisher:
pypi-client.yml on f-inverse/jammi-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jammi_ai-0.34.0-py3-none-any.whl -
Subject digest:
b1f887fc7455acc9ba8e77a6c17cec63025d43ef728e835e68b15e673fe77fa1 - Sigstore transparency entry: 2100061336
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@504088f901f2d3b64979b7edfaf6d94b151c8ac9 -
Branch / Tag:
refs/tags/py-v0.34.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-client.yml@504088f901f2d3b64979b7edfaf6d94b151c8ac9 -
Trigger Event:
push
-
Statement type: