Skip to main content

oneport-account

The account & metering client shared by every paid Oneport tool. Login, token balance, redeem codes — and the call_managed_llm() function tools use to run a billed model call through the Oneport backend.

No tool ever holds a model key. Each holds only your revocable op_live_... token; the backend meters your balance and calls the model with the server-side key.

For users

# 1. Get a token (free signup tokens) at https://oneport.dev, then:
oneport-account login op_live_xxxxxxxxxxxx      # or: op account login ...
oneport-account balance                         # tokens remaining + usage by tool
oneport-account redeem LAUNCH2026               # redeem a free-token code
oneport-account logout

When a tool runs out of tokens it prints a buy link; top up on the website and keep going. Codes grant free tokens (great for launches, students, design partners).

For tool authors

from oneport_account import call_managed_llm, OutOfTokens, NotLoggedIn

try:
    result = call_managed_llm(system, user, tool="apidiff", action="classify")
    text, tokens, balance = result.text, result.tokens_used, result.balance
except NotLoggedIn:
    ...   # tell the user to `oneport-account login`
except OutOfTokens as e:
    ...   # show e.buy_url

call_managed_llm raises NotLoggedIn, OutOfTokens (with .buy_url), RateLimited, or AccountError — map these onto your tool's own taxonomy.

Configuration

The backend URL resolves as: $ONEPORT_API_URL → the value pinned at login → DEFAULT_API_URL in config.py (set this to your Supabase Edge Functions base URL once, e.g. https://<ref>.supabase.co/functions/v1).

The token is stored at ~/.oneport/credentials.json (0600 where supported).

Privacy

Deterministic work in every tool stays local. Only the LLM judgment call routes through the proxy so it can be metered — and only the already-computed prompt (never your repository) is sent. See each tool's PRIVACY notes.

MIT licensed.

Metadata

Release files for oneport-account 0.4.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 oneport-account 0.4.0
File Size Uploaded
oneport_account-0.4.0.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oneport-account 0.4.0
File Interpreter ABI Platform
oneport_account-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / oneport_account-0.4.0.tar.gz

Download URL oneport_account-0.4.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c6c55946e6367a6a7c586d141e83d087cf07982998ec98b968e5bf4ec3c6621a
BLAKE2b-256 checksum
How to use checksums
7037494e807260af34faa771a138696c4eb872b203eadf8a456926284106b812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / oneport_account-0.4.0-py3-none-any.whl

Download URL oneport_account-0.4.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1275bf8fdca96ac302ec2675f7bd7a8927a7cd187ca5d9ca68e942a9199bf1cf
BLAKE2b-256 checksum
How to use checksums
2eab19ba2f81e7425dd620abdc22d195283e9706ca19f04be1f0150230b06044
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

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