Skip to main content

telonyte-brain

Python client for the B.R.A.I.N. V1 HTTP API. Standard library only, Python 3.9 or newer.

from telonyte_brain import add, find
add("my-bot", "NEW | The staging deploy runs on Fridays | team notes")
print("\n".join(find("staging deploy")["lines"]))

Set BRAIN_KEY and optionally BRAIN_URL. See the copy-paste examples on https://brain.telonyte.com/setup/api.

Module functions: status(), add(bot, text), find(q, n=5), delete(uid), hyper(), close(). For more than one key, or to choose where the local copy lives, use a client:

from telonyte_brain import Client
brain = Client(url=None, key=None, local=True, cache_dir=None, bot=None)
brain.find("staging deploy")
brain.hyper()["text"]   # "Hyper speed: on (local copy, synced 4s ago)"
brain.close()

Hyper speed

The first time you look something up, the package starts keeping a private copy of your team's memory on this computer and keeps it up to date in the background. After that, lookups are answered from that copy, in a few milliseconds, with the same results the host would give. Notes added from any computer show up here within a few seconds. If the copy cannot answer, the host does, so a lookup always works.

Every find answer carries mode (local or host) and reason, plus synced_ago_s when it came from the copy. hyper() returns {mode, reason, synced_ago_s, text}, for example:

  • Hyper speed: on (local copy, synced 4s ago)
  • Hyper speed: on (local copy, offline)
  • Hyper speed: off (using host: no local copy yet)
  • Hyper speed: off (using host: serverless or short-lived machine)

If you already run the brain command line tool with the same URL and key, its background helper answers instead, so nothing is kept twice.

The copy is stored in telonyte-brain/<id>/ under your cache folder (~/.cache, or %LOCALAPPDATA% on Windows), readable only by you, and encrypted at rest. It is removed if the key is revoked or the team is suspended, and it locks if the computer stays offline past the license window.

Turn it off. Pass local=False to Client, or set BRAIN_LOCAL=0. Every call then goes to the host, as in earlier versions, and no folder is created.

Serverless and short-lived machines. On AWS Lambda, Vercel, Netlify, Google Cloud Functions and Run, Azure Functions and Deno Deploy the package detects it and uses the host, because a copy would be gone at the next start. The same happens when the cache folder cannot be written or this Python has no sqlite3 with FTS5. The local path never raises: any problem sends the question to the host.

Writes. add goes to the host. If the host cannot be reached, the note is saved in a small outbox on this computer, shows up in local lookups right away, and is sent later. Each note carries an id, so a resend never makes a second copy.

Background work runs in daemon threads that never keep your program alive. close() stops them; it also runs when the program exits.

Metadata

Release files for telonyte-brain 0.2.3

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

Source distribution (sdist)

Source distribution for telonyte-brain 0.2.3
File Size Uploaded Provenance Actions
telonyte_brain-0.2.3.tar.gz 83.4 kB Without provenance Details for telonyte_brain-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for telonyte-brain 0.2.3
File Interpreter ABI Platform Actions
telonyte_brain-0.2.3-py3-none-any.whl Python 3 none any Details for telonyte_brain-0.2.3-py3-none-any.whl

Total release size: 164.1 kB

Release files / telonyte_brain-0.2.3.tar.gz

Download URL telonyte_brain-0.2.3.tar.gz
Size 83.4 kB
Tags Source
SHA-256 checksum
How to use checksums
02abcb6dd86f339ae45b07dcd89622351e504df8a505054ea2c2c9e05c8f22f2
BLAKE2b-256 checksum
How to use checksums
f6b3b56d8ee32d11ed6e299b99527ab7aaa1b6795dfa25493eb7d02a1f457f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / telonyte_brain-0.2.3-py3-none-any.whl

Download URL telonyte_brain-0.2.3-py3-none-any.whl
Size 80.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e1ec9f146294171df036cfde130ed1da22cf193f45be6d1592b89ef995f4cd6
BLAKE2b-256 checksum
How to use checksums
afd01e6e8435ad6bb8b9df8fa18470cdda248499c67bb50c9a8faa7e0348b554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for telonyte-brain 0.2.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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