Faro SDK: run free Faro tools on-device via the bundled Rust core, fall back to the API for the rest. Local and remote results share the identical envelope.
Project description
askfaro
The Faro Python SDK. Local-first: tools the bundled Rust core can run execute on-device — no API key, no network, no credits. Everything else falls back to the Faro backend. Local and remote results share the identical canonical envelope, so the same code path works whether a tool ran on your machine or in the cloud.
pip install askfaro
from faro import Faro
faro = Faro() # no key needed for on-device tools
r = faro.invoke("calc/evaluate", {"expression": "2 + 2 * 3"})
assert r.ok and r.local and r.data["result"] == 8
faro = Faro(api_key="faro_...") # a key enables backend fallback
faro.invoke("weather/current", {"city": "Paris"}) # -> backend (vendor-backed)
The Rust core is compiled into this package (faro._core), so a single
pip install askfaro is all you need — there is no separate core package to
install.
Routing
Faro(mode=...) (per-call override on invoke(..., mode=...)):
| mode | behavior |
|---|---|
auto (default) |
run on-device when the core can; otherwise call the backend |
local |
on-device only; raise LocalUnavailableError if the core can't run it |
remote |
always call the backend |
What can run on-device is the bundled core's own capability list
(Faro.local_namespaces()), not a pricing flag — it grows as more tools are
ported into the core. A vendor-backed tool (weather, web search, …) physically
needs the backend and always routes remote.
What's bundled
faro._core is the MIT open-source free-tool slice of the Faro core (the
faro-core-free Rust crate): calc, units, phone, astronomy, encoding, datetime,
timezone, random — plus the canonical envelope builders. The proprietary parts of
Faro (selection gate, signed continuations, cloud client, billing) are NOT in this
package; vendor-backed tools run server-side via the API.
Development
This is a maturin mixed Rust/Python project:
python/faro/— the pure-Python SDK (routing, client, result types)src/lib.rs— the PyO3 binding that builds thefaro._coreextension from thefaro-core-freecrate
maturin develop # build faro._core and install faro editable
pytest # 16 tests, no network
Published wheels are prebuilt (manylinux + macOS universal2), so end users install with no Rust toolchain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 askfaro-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: askfaro-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b983a46fb58f76442aecd334210a7d924b85e7a08176a21b54767af4d36a191c
|
|
| MD5 |
660f57f995ce239f9df770053c139108
|
|
| BLAKE2b-256 |
ba726c3cb7c2267a9d9ce218c5a8df74e5e99db3939b80d61424f0d4758e1e60
|
File details
Details for the file askfaro-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: askfaro-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aac96d4d225f9e60d0dc8e049ef2b9e6e8ed38507cc31b2f5f9adee0fcff582
|
|
| MD5 |
c175b2409a0716cefd72511a82c1ceed
|
|
| BLAKE2b-256 |
f27a2050875fa26c87ad4011f5f0482a794b56411e098c4d10c6433c024b3ffa
|
File details
Details for the file askfaro-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: askfaro-0.1.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
869cf14731752a740c5d08a22534177428cfc7926292b82549628e5a7f6e69d8
|
|
| MD5 |
f0f60b93909166d24b28bdd89bf5bb39
|
|
| BLAKE2b-256 |
01abe5b3d4a8a96e39ef777457b598efc393669232a4a1bfcd23f4e737449a39
|