Skip to main content

Instant observability for developers shipping fast

Project description

observable-code

Did my thing run? Add one decorator to a Python function and a real-time it ran ✓ / it failed ✗ event appears on your phone — and on the web — within ~2 seconds.

Built for background jobs, webhooks, cron tasks, and AI-generated automation. Deliberately not Datadog: instant, low-friction confidence, not deep telemetry.

pip install observable-code

Quickstart

import observable

@observable.track()
def nightly_job():
    ...  # your work

nightly_job()  # → "it ran ✓" on your phone

Pair your phone once with a QR scan:

observable setup        # renders a QR code; scan it in the mobile app

That's it. Every run of a tracked function now shows up live.

The golden rule

Tracking never blocks, delays, or crashes your function. Dispatch is fire-and-forget on a background thread with a short timeout; any error fails silently to stderr. Your decorated function returns immediately (typically <50 ms) even if the network is down or the server hangs.

More

@observable.track()
async def my_async_job(): ...        # works on async functions

with observable.track("data-import"): # works as a context manager
    ...

observable.trace("rows", 1240)        # attach metadata to the current event
observable.event("deploy-finished")   # standalone fire-and-forget event

Production (env vars)

For deployed services, configure via environment instead of QR pairing:

export OBSERVABLE_CODE_API_KEY="obscode_sk_..."   # account-mode API key
# or OBSERVABLE_CODE_SESSION_ID="..."             # anonymous session id
export OBSERVABLE_CODE_API_URL="https://observable.codes"  # optional override

Credentials resolve in order: env var → config file (~/.observable-code/config.json).

CLI helpers: observable show-key, observable status, observable pair.

Testing

Set OBSERVABLE_TEST_MODE=1 to switch to synchronous posting for deterministic tests.


Requires Python ≥3.9. Canonical host: observable.codes.

Project details


Download files

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

Source Distribution

observable_code-0.2.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

observable_code-0.2.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file observable_code-0.2.0.tar.gz.

File metadata

  • Download URL: observable_code-0.2.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for observable_code-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4f189493faea81e949ff11483880ee88f93f6aef15c7812bdb52fa62c0566c0b
MD5 5ac511261ba2f83546054146b0e8f62c
BLAKE2b-256 9cb1fde30e43e38543c80f6fae9cdb160707ee49ed1315e43b600798a0d42a86

See more details on using hashes here.

File details

Details for the file observable_code-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for observable_code-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e426209c60519e980cfa17c135c40bfb9e23384f188001aaee9b168cf7f4346b
MD5 3f9a1dd79d7be6dd7bf6327cf2916820
BLAKE2b-256 b8d5d956728028a5f803daae2ebce6964a38f0bc5e9d605a42c4bbe5e98bed31

See more details on using hashes here.

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