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,
)
Solutions (bundled workflows)
# Quick company verification (KYB Essentials — 20 countries)
result = strale.do(
solution="kyb-essentials-se",
input={"org_number": "5591674668"},
)
# Full compliance check with risk narrative (KYB Complete)
full_check = strale.do(
solution="kyb-complete-se",
input={"org_number": "5591674668", "domain": "example.com"},
)
# full_check["narrative"] — plain-language risk assessment
# full_check["checks"] — structured results
# Invoice fraud detection (Invoice Verify)
invoice_check = strale.do(
solution="invoice-verify-se",
input={
"org_number": "5591674668",
"vat_number": "SE559167466801",
"iban": "SE3550000000058398257466",
},
)
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()
# 256 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 256 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
straleio-0.1.4.tar.gz
(11.5 kB
view details)
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
straleio-0.1.4-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file straleio-0.1.4.tar.gz.
File metadata
- Download URL: straleio-0.1.4.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90d6f035cd92c3674bbad2bb068dad8d6e5295a9d7760be990652b4da2a8f7db
|
|
| MD5 |
504f2c7916cd77f4c9e8a9a2ee74e964
|
|
| BLAKE2b-256 |
c269abfb09e56d62a81780d3b7d77160a570a1fcc60ff0c5d949cd4b7cd756a9
|
File details
Details for the file straleio-0.1.4-py3-none-any.whl.
File metadata
- Download URL: straleio-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.0 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 |
558b99b957aa47dc4b1d5d5e7aa8bcf781ac54981a780b9da3e498aa107890b2
|
|
| MD5 |
ba6e39f8ffa64ae672f53fc003698c0d
|
|
| BLAKE2b-256 |
2fdbb81c47e0e6c2a99e5efee9cf4918c9206e5c2590e71322c3d75a24bd244e
|