Skip to main content

CalcLane — open calculator engine for agents. Local evaluate + hosted Talocode API SDK/CLI.

Project description

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 JSONok, result, display, mode, error
  • Local free path — stdlib evaluator, no network
  • Hosted path — same contract on Talocode Cloud (1 credit per evaluate)
  • CLIcalclane 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

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

talocode_calclane-0.3.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

talocode_calclane-0.3.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file talocode_calclane-0.3.0.tar.gz.

File metadata

  • Download URL: talocode_calclane-0.3.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for talocode_calclane-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0925e063b262cc44d1ae745bf9a27528425ce3a06423d0bebbcf08d49a47e094
MD5 f8ad5425f98759dac2ff280a8c20699c
BLAKE2b-256 edc64039d1e58b6766a6e0bc8fc42911f7cbe9b5471024f91aeafc514f318738

See more details on using hashes here.

File details

Details for the file talocode_calclane-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for talocode_calclane-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 549815fc412f6d13c425833ffdd0a48b14c8ef0eec0e5ee203acc6950ece37ba
MD5 340049e88a8521e170c26032eb643d63
BLAKE2b-256 fbbf48795d5366ce7e4444cabf5e05b34d8dab10986778e9ed8f7fb9ed5e46cf

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