Skip to main content

frootai-orchard

Programmatic Python SDK for the FrootAI Orchard catalog — type-safe list / search / show / bushel surface for partner apps, CI pipelines, and BI integrations.

Byte-equal contract with the npm @frootai/orchard v1.0.0 SDK: same enums, same filter expression language, same HMAC-signed pagination cursors, same retry semantics, same shared ~/.frootai/.token auth file. A query that returns 12 results in JS returns the same 12 results in Python.

Install

pip install frootai-orchard

Zero runtime dependencies. Python 3.10+. Stdlib only (urllib, hmac, base64, json, hashlib, pathlib).

Quickstart

from frootai_orchard import create_client

client = create_client()

# Anonymous catalog reads — no auth required
for fruit in client.list(variety="azure", where="ripeness:Mature OR ripeness:Bearing"):
    print(fruit["name"], "—", fruit.get("tagline", ""))

# Search with scoring
for hit in client.search("rag", limit=10):
    print(f'{hit["_score"]:>2}  {hit["name"]}')

# Single fruit detail
detail = client.show("ms-azure-openai-rag")

# Authenticated — bushel sync (Team tier+)
client.bushel.add("ms-azure-openai-rag")
print(client.bushel.list()["ids"])

# Never-raises auth probe
print(client.whoami())
# → {"signed_in": True, "anonymous": False, "redacted": "…a3f9", ...}

Auth priority

  1. token= keyword argument
  2. FROOTAI_TOKEN environment variable
  3. ~/.frootai/.token shared file (same as the frootai CLI)

A frootai login in your terminal transparently authorizes Python SDK calls.

Typed errors

Every public surface raises only FrootaiOrchardError subclasses — partners catch by type, never by string match:

from frootai_orchard import errors as fai_err

try:
    client.bushel.add("some-fruit")
except fai_err.NotSignedInError:
    print("Run `frootai login` first")
except fai_err.EntitlementRequiredError as e:
    print(f'Upgrade required: {e.context["entitlement"]}')
except fai_err.RateLimitError as e:
    print(f"Slow down — retry after {e.retry_after_ms} ms")

Filter expression language

Identical grammar to the npm SDK:

client.list(where="tier_class:paid AND variety:azure")
client.list(where="ripeness:Mature OR (variety:gcp AND category:rag)")
client.list(where='NOT category:eval')

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frootai_orchard-1.0.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

frootai_orchard-1.0.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file frootai_orchard-1.0.0.tar.gz.

File metadata

  • Download URL: frootai_orchard-1.0.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for frootai_orchard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 93e1a0fb6044096bf70e171dc1448e66042daa6b3cb5e2dd5d37e1068f8be4d6
MD5 d3a0985f9c83d3a863bb37664a233aa9
BLAKE2b-256 6eb81a82d74d9f99b5c61ab2f9702b0a38c100af7e79aaf579d3d4497a5f286f

See more details on using hashes here.

File details

Details for the file frootai_orchard-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for frootai_orchard-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64d59a70e03e87d121d86e0656ede577281320b509cba5db3a5e5da4d636bcbf
MD5 0a4ec4a52760d0439f5ebec526bfec16
BLAKE2b-256 37da86389f8bffebe89a94abecefbc22f41f1739727111e5ff11f9f90374feba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page