Skip to main content

buildit-argus

Track per-call LLM cost and latency for Python apps — powered by the Argus observability dashboard.

Zero dependencies. Works with Anthropic, OpenAI, or any provider via manual tracking.


Installation

pip install buildit-argus

Quick start

import argus

argus.init(
    endpoint='https://api.buildit.sh',
    api_key='bld_live_...',  # Settings → API Keys on app.buildit.sh
)

Usage

Anthropic

Wrap your Anthropic client once — every messages.create call is tracked automatically.

import anthropic
import argus

argus.init(endpoint='https://api.buildit.sh', api_key='bld_live_...')

client = argus.wrap_anthropic(anthropic.Anthropic())

msg = client.messages.create(
    model='claude-haiku-4-5-20251001',
    max_tokens=1024,
    messages=[{'role': 'user', 'content': 'Hello'}],
)

OpenAI

from openai import OpenAI
import argus

argus.init(endpoint='https://api.buildit.sh', api_key='bld_live_...')

client = argus.wrap_openai(OpenAI())

res = client.chat.completions.create(
    model='gpt-4o-mini',
    messages=[{'role': 'user', 'content': 'Hello'}],
)

Manual tracking

result = argus.track(
    provider='my-provider',
    model='my-model-v1',
    fn=lambda: my_llm_call(),
    op_name='chat',  # optional label shown in dashboard
)

API

argus.init(endpoint, api_key)

Param Default Description
endpoint ARGUS_ENDPOINT env var Your Argus ingest URL
api_key ARGUS_KEY env var API key from buildit.sh

argus.wrap_anthropic(client)

Patches client.messages.create to auto-track every call. Returns the same client.

argus.wrap_openai(client)

Patches client.chat.completions.create to auto-track every call. Returns the same client.

argus.track(provider, model, fn, op_name, options)

Param Type Description
provider str Provider name (e.g. anthropic, openai)
model str Model ID
fn callable The call to wrap
op_name str Optional label shown in dashboard
options list Optional feature flags

Environment variables

export ARGUS_ENDPOINT=https://api.buildit.sh
export ARGUS_KEY=bld_live_...

If set, you don't need to call argus.init().


Get an API key

  1. Sign in at app.buildit.sh
  2. Go to Settings → API Keys
  3. Click Create key
  4. Pass it to argus.init() or set ARGUS_KEY in your environment

License

MIT

Metadata

Release files for buildit-argus 0.1.6

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

Source distribution (sdist)

Source distribution for buildit-argus 0.1.6
File Size Uploaded Provenance Actions
buildit_argus-0.1.6.tar.gz 5.6 kB Without provenance Details for buildit_argus-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for buildit-argus 0.1.6
File Interpreter ABI Platform Actions
buildit_argus-0.1.6-py3-none-any.whl Python 3 none any Details for buildit_argus-0.1.6-py3-none-any.whl

Total release size: 12.0 kB

Release files / buildit_argus-0.1.6.tar.gz

Download URL buildit_argus-0.1.6.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fb8605e5c6020160c3ee0b2213c452dcce89ba722792c9b67b548f72d906a89b
BLAKE2b-256 checksum
How to use checksums
c8d2aab8d323523b50218b1924d3b1a61011d7bb69f710e7dd0c6ee5e7f7d66a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / buildit_argus-0.1.6-py3-none-any.whl

Download URL buildit_argus-0.1.6-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5efb9942abf4444ef176a6074298b75bb7030abc032120ecc604f97c70c414c
BLAKE2b-256 checksum
How to use checksums
08e1bb6021eefe2a78376ed4daa0e5929ddfc4b9f58c1cac4fed91c417545ac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for buildit-argus 0.1.6

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