Python SDK for the Strale API — let AI agents buy capabilities at runtime
Project description
straleio
Python SDK for the Strale API — let AI agents buy and execute capabilities at runtime.
Install
pip install straleio
Quick start
from straleio import Strale
strale = Strale(api_key="sk_live_...")
result = strale.do(task="validate VAT number SE556703748501")
print(result.output)
# {"valid": True, "country_code": "SE", "company_name": "Spotify AB"}
Execute by slug
result = strale.do(
capability_slug="vat-validate",
inputs={"vat_number": "SE556703748501"},
max_price_cents=10,
)
Dry run (preview cost without executing)
preview = strale.dry_run(task="look up Swedish company Klarna")
print(preview.matched_capability) # "swedish-company-data"
print(preview.price_cents) # 80
Async support
import asyncio
from straleio import Strale
async def main():
strale = Strale(api_key="sk_live_...")
result = await strale.do_async(task="validate VAT number SE556703748501")
print(result.output)
asyncio.run(main())
Check balance
balance = strale.get_balance()
print(balance.balance_eur) # "1.84"
List capabilities
capabilities = strale.list_capabilities()
# 250+ capabilities with slug, name, price, category
Free-tier (no API key)
5 capabilities work without authentication:
strale = Strale(api_key="")
result = strale.do(
capability_slug="email-validate",
inputs={"email": "hello@example.com"},
)
Options
strale = Strale(
api_key="sk_live_...",
base_url="https://api.strale.io", # default
timeout=60.0, # seconds, default 60
default_max_price_cents=200, # cap per call, default €2.00
)
Error handling
from straleio import Strale, StraleError
try:
result = strale.do(task="...")
except StraleError as e:
print(e.code) # "insufficient_balance" | "no_matching_capability" | ...
print(e.message)
Try for Free
5 capabilities work without an API key or signup:
email-validate— verify email deliverabilitydns-lookup— DNS record lookupjson-repair— fix malformed JSONurl-to-markdown— convert any URL to markdowniban-validate— validate international bank account numbers
For all 250+ capabilities, sign up for €2 in free trial credits.
Resources
- 📖 Documentation
- 💡 Examples — copy-paste examples for every integration
- 💰 Pricing
- 🔍 Quality methodology
- 🔒 Security
License
MIT — see LICENSE
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file straleio-0.1.3.tar.gz.
File metadata
- Download URL: straleio-0.1.3.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3fc7c1bd367cb770a2f44f03551656dcfcec7df2311636d36058b900793bbb7
|
|
| MD5 |
25d880411cff50dacd45a6e7f8633972
|
|
| BLAKE2b-256 |
7facadde8316c141f090dd4df7b8c772805ea590a6a8b9d77075c71d5d1140af
|
File details
Details for the file straleio-0.1.3-py3-none-any.whl.
File metadata
- Download URL: straleio-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91744b8f42d5d6b40514f081b53ad0d071b95437090c001999cfd78dd9dede0c
|
|
| MD5 |
e5e75ef788f12d75d2617026bb916518
|
|
| BLAKE2b-256 |
3fc016a0985a547c37ab85c7614ec78936339f9a8f3df8038e1dd70294430a96
|