Skip to main content

glyphh

Ada for Python: your models in Ada Cloud, https://ada.glyphh.ai, called with an API key. Python 3.9 or later, no dependencies.

pip install glyphh
from glyphh import Ada, LimitError

ada = Ada()                     # GLYPHH_API_KEY from the environment; or Ada(key="glyphh_ak_...")

d = ada.decide("tickets", {"ticket": {"what": {"plan": "pro", "text": "charged twice"}}})
if d.ask:                       # a person should decide: d.outcome is the best guess, for them to see
    send_to_a_person(d)
else:
    act(d.outcome)              # d.probabilities, d.expected_cost, d.receipts: the precedents it stands on

tickets = ada.model("tickets")
tickets.record({"ticket": {...}}, "refund")                     # a confirmed outcome: the next case learns from it

The key is made on the platform's API Keys page (https://platform.glyphh.ai), or by Claude through the Glyphh connector; it acts in your org, with the clearance it was made with. GLYPHH_ADA_URL moves the address (a local server under test); 3.0's GLYPHH_RUNTIME_URL and GLYPHH_RUNTIME_KEY are still read.

From nothing to a decision

tickets = ada.create_model("tickets", spec)                     # the spec as JSON: layers, segments, roles, output
job = tickets.import_file("history.csv", mapping={"Plan": "ticket.what.plan", "Result": "outcome"},
                          on_progress=lambda j: print(j.state, j.percent))
print(job.result["added"], job.result["refused"], job.result["refusals"][:3])

bt = tickets.backtest([{"settings": {"word_evidence": 0}, "name": "no word evidence"}], holdout={"newest": 200})
print(bt.result["active"]["accuracy"], bt.result["candidates"][0]["change"])
tickets.settings({"word_evidence": 0}, note="cost 8% less on the last 200", backtest=bt.id)   # a new version
tickets.activate(1)                                            # and back
tickets.export(to="tickets.zip")                               # everything, as a zip: never locked in
Ada decide(model, data, output=, outputs=, include=["facts"], clearance=) (POST /v1/decide); models(), model(name), create_model(name, spec), delete_model(name); job(id), wait(job, timeout=, on_progress=), download(job); usage()
Model info(), spec(), set_spec(spec, note=, backtest=), settings() and settings(changes, note=, backtest=), versions(), activate(version), delete(); record_many(cases) (a thousand a request, in chunks), grade(id, value, output=), forget(id); decide(data, ...); learn(), learn_job(), calibrate(), backtest(candidates, holdout=, output=); import_file(path or bytes, format=, mapping=, partial=, learn=), export(format=, to=)
Decision outcome, probabilities, expected_cost, ask, receipts, facts, outputs, model, version; reads as 3.0's Result too (done, status, data)
Job id, model, kind, state (awaiting, queued, running, done, failed), percent, result, error, download, upload; done, failed, ended
Usage plan, month (YYYY-MM, UTC), resets_at (YYYY-MM-DD), models, precedents (used, max), requests (used, max, over, overage: past the month metered on Basic, Pro and Team, refused on Free), requests_per_second; None is by contract, no cap
AdaError code, message, status, detail, retry_after, trace_id; typed by code: AuthError, LimitError (reason, used, max, plan, upgrade, resets_at), RateError (retry_after from Retry-After, max; waited out while the retry deadline allows), InvalidError, ModelMissingError, JobMissingError, SpecError, SpecLimitError, SpecReadingError, FewRolesError, MappingError, BusyError, NotReadyError, NoChangeError, IdempotencyError, VersionGoneError, AdaTimeoutError, UnavailableError, JobFailedError (a job that ended failed)

Every call that runs long is a job, waited for with its progress unless wait=False. Every write carries an Idempotency-Key, so the client sends again what is safe to: a read, or a write, while Ada is unreachable for a moment (E_UNAVAILABLE, E_TIMEOUT, a 502 to 504), and anything refused with 429, with backoff and Retry-After, for up to Ada(retry_deadline=) seconds (default 30; 0: never).

SDK 3.0's calls still work: Model.record, query, facts, probabilities, learn and call(function, inputs) go through POST /v1/runs and answer a Result (run_id, status, data, ...). The cloud answers every run at once, so a decision never waits for input: it says ask.

The API and its answers' shapes are in contract/contract.json. Pin glyphh>=3: versions up to 2.6.7 are a different, older library.

License

MIT (LICENSE).

Metadata

Release files for glyphh 3.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glyphh 3.2.0
File Size Uploaded Provenance
glyphh-3.2.0.tar.gz 24.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for glyphh 3.2.0
File Interpreter ABI Platform
glyphh-3.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.9 kB

Release files / glyphh-3.2.0.tar.gz

Download URL glyphh-3.2.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bd767a759040f1a0909e08d383297b2f3bf78005b0ce40ef86ce8029a47aaff3
BLAKE2b-256 checksum
How to use checksums
c3b6d5e82d7f7abf2b51625f28c31914a38e766807fb7e48c1dda0d93a7358a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / glyphh-3.2.0-py3-none-any.whl

Download URL glyphh-3.2.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f29c47bb45720066bf38a7a6858deaedd3912f4da153beb4551fe253f86debd
BLAKE2b-256 checksum
How to use checksums
169ce65e1f251f2c87ecfa2b60d94bba717efc1b49b2b257760fc7b4c817b7dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for glyphh 3.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for glyphh-3.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.2.0 This release

2 release files Full provenance

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