CalcLane (Python)
Open calculator for agents — local expression evaluation plus hosted Talocode API client.
Part of Talocode — open tools people trust; hosted power under docs.talocode.site.
| Cloud API | https://api.talocode.site → /v1/calclane/* |
| Python | pip install talocode-calclane (this package) |
| Node | npm install @talocode/calclane |
| Repo | github.com/talocode/calclane |
| License | MIT |
Why CalcLane?
Agents need deterministic math as a tool, not a free-form LLM guess:
- Structured JSON —
ok,result,display,mode,error - Local free path — stdlib evaluator, no network
- Hosted path — same contract on Talocode Cloud (1 credit per evaluate)
- CLI —
calclane eval "2+3*4"
Install
pip install talocode-calclane
Requires Python 3.10+. Stdlib only (no extra runtime deps).
Quickstart
import os
from calclane import CalcLaneClient
client = CalcLaneClient()
# Local (free)
print(client.evaluate("2 + 3 * 4"))
print(client.evaluate("sin(90)", angle="deg"))
print(client.evaluate("5!"))
# Hosted API (1 credit) — needs TALOCODE_API_KEY
cloud = CalcLaneClient(
api_key=os.environ["TALOCODE_API_KEY"],
prefer_local=False,
)
print(cloud.evaluate_remote("sqrt(144)"))
Environment
| Variable | Default | Purpose |
|---|---|---|
TALOCODE_API_KEY |
— | Bearer token for hosted routes |
TALOCODE_BASE_URL |
https://api.talocode.site |
API host |
CLI
calclane eval "2^10"
calclane eval "sin(90)" --angle deg
calclane health
calclane pricing
calclane eval "pi*2" --remote # hosted, 1 credit
Or: python -m calclane eval "...".
API surface
| Method | Path | Credits |
|---|---|---|
| GET | /v1/calclane/health |
free* |
| GET | /v1/calclane/pricing |
free* |
| GET | /v1/calclane/capabilities |
free* |
| POST | /v1/calclane/evaluate |
1 |
| POST | /v1/calclane/dispatch |
1 |
*Valid API key required; no credit charge.
Auth: Authorization: Bearer $TALOCODE_API_KEY or X-Api-Key.
Related packages
| Package | Install |
|---|---|
| This package | pip install talocode-calclane |
| Node SDK / CLI | npm i @talocode/calclane |
| SearchLane | pip install talocode-searchlane |
| StackLane | pip install talocode |
| Tera | pip install talocode-tera |
Talocode ecosystem
| Project | What it is |
|---|---|
| Codra | Local-first agentic coding · pip install talocode-codra |
| Tera | AI learning companion · pip install talocode-tera |
| Stacklane | Cloud control plane · pip install talocode |
| SearchLane | Agent web search · pip install talocode-searchlane |
| DocuLane | Office documents · pip install talocode-doculane |
| ContextLane | Context tooling · pip install contextlane |
| Tradia | Trading agents · pip install tradia |
| CalcLane (this package) | Open calculator · pip install talocode-calclane |
More: github.com/talocode · talocode.site · docs.talocode.site
License
MIT © Talocode
Metadata
Release files for talocode-calclane 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| talocode_calclane-0.3.0.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| talocode_calclane-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / talocode_calclane-0.3.0.tar.gz
| Download URL | talocode_calclane-0.3.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0925e063b262cc44d1ae745bf9a27528425ce3a06423d0bebbcf08d49a47e094
|
|
BLAKE2b-256 checksum How to use checksums |
edc64039d1e58b6766a6e0bc8fc42911f7cbe9b5471024f91aeafc514f318738
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / talocode_calclane-0.3.0-py3-none-any.whl
| Download URL | talocode_calclane-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
549815fc412f6d13c425833ffdd0a48b14c8ef0eec0e5ee203acc6950ece37ba
|
|
BLAKE2b-256 checksum How to use checksums |
fbbf48795d5366ce7e4444cabf5e05b34d8dab10986778e9ed8f7fb9ed5e46cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|