jmfts-client
The thin half of JMFTS: the wire contracts, and an HTTP client generated from them.
Install this to call a JMFTS appliance. Install jmfts to run one.
pip install jmfts-client
Two dependencies — httpx and pydantic. A consumer that only makes requests does not
install sqlalchemy, psycopg2, pgvector, transformers or pymupdf to do it.
Use
from jmfts_client import RemoteJmftsClient
from jmfts_client.contracts import DocumentCreate, HybridSearchRequest
with RemoteJmftsClient("http://localhost:8100", token="...") as jmfts:
doc = jmfts.create_document(DocumentCreate(title="Ada", content="Ada Lovelace"))
hits = jmfts.hybrid_search(HybridSearchRequest(query="Ada", limit=10))
for hit in hits.results:
print(hit.document_id, hit.score)
Errors arrive as exceptions carrying the status: JmftsNotFound, JmftsBadRequest,
JmftsConflict, JmftsUnprocessable, JmftsServerError. All descend from JmftsError.
A request that never reached the server raises JmftsTransportError.
Where the methods come from
Nobody writes them. A JMFTS service method marked @expose becomes a REST route, an entry
in the OpenAPI document, a method on the in-process LocalJmftsClient, and a method here —
four views of one definition.
jmfts_client/_verbs.py is generated from the route table the server actually builds, not
from the decorator's declaration, because the decorator does not record which parameters
are body, query or path — FastAPI's inference decides that, and reading the built routes is
what keeps this client and the server agreeing about the wire. Regeneration lives in the
jmfts repository (python -m scripts.generate_client), and a test there fails if this
file falls behind the surface.
What this client does not offer
LocalJmftsClient.unit_of_work() groups several writes into one transaction. There is no
equivalent here, deliberately. Each HTTP request is its own transaction on the server, so a
unit_of_work over HTTP could group the calls but could not roll back the earlier ones when
a later one failed. If you need that guarantee, run in-process with jmfts installed.
Licence
MIT. Copyright (c) 2026 Fight Fire with Fire Robotics, LLC.
Metadata
Release files for jmfts-client 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jmfts_client-0.2.0.tar.gz | 45.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jmfts_client-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 99.1 kB
Release files / jmfts_client-0.2.0.tar.gz
| Download URL | jmfts_client-0.2.0.tar.gz |
|---|---|
| Size | 45.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6079bae8092008815b127717b6c529073d937b8869d93bdf7df31d6c90b5dfcb
|
|
BLAKE2b-256 checksum How to use checksums |
9c8b7332c05769f115b75742ec393b29a76427140d40e06a1d41faa6199af6e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / jmfts_client-0.2.0-py3-none-any.whl
| Download URL | jmfts_client-0.2.0-py3-none-any.whl |
|---|---|
| Size | 53.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
316d1f59ed4b8217ea4437322c7c392d4ea0d0bc763db405935f175ae1e19682
|
|
BLAKE2b-256 checksum How to use checksums |
f8f6706684cd9df7ccca8e4bf4138a1b9f5f7a51c24d8659d525906a571e5a0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|