Skip to main content

Python SDK for the Fabric AI workflow platform

Project description

fabric-platform

Python SDK for the Fabric AI workflow platform.

Installation

pip install fabric-platform

Quick Start

from fabric_platform import FabricClient

# API key auth
fabric = FabricClient(api_key="fab_your_key")

# Or: native email/password auth
fabric = FabricClient(base_url="https://fabric.example.com")
auth = fabric.login("alice@example.com", "SecurePass1!")

# Or: consumer-driven social login (your app handles OAuth)
auth = fabric.social_login(
    provider="google",
    provider_user_id=google_user["sub"],
    email=google_user["email"],
    display_name=google_user["name"],
)

# Use the authenticated client
me = fabric.get_me()
orgs = fabric.get_my_organizations()

Features

  • Auth: signup, login, social login, change password, logout-all
  • Organizations & Teams: CRUD, memberships, invitations
  • Workflows: submit, monitor, stream events
  • Assets: upload, download, galleries
  • Webhooks & Schedules: create, manage, delivery history
  • Admin: user management (list, unlock, verify, delete)

Typed workflows

Fabric derives JSON Schemas from each workflow's Pydantic task types at server boot and stores them in the registry. Discover a workflow's contract without reading the source:

schemas = fabric.get_workflow_schemas("research/trends")
print(schemas["input_schema"])    # JSON Schema for workflow input
print(schemas["output_schema"])   # JSON Schema for workflow output
print(schemas["task_schemas"])    # Per-task breakdown

Opt in to server-side validation on submission:

from fabric_platform.errors import FabricValidationError

try:
    run = fabric.submit_run(
        "research/trends",
        input={"topic": 42},  # wrong type
        validate=True,
    )
except FabricValidationError as e:
    print(e.response.json()["error"]["details"])

See the Typed Workflows guide for the full pattern, CI integration, and migration tips.

Documentation

See the Fabric documentation for the full API reference.

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

fabric_platform-0.13.0.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

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

fabric_platform-0.13.0-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file fabric_platform-0.13.0.tar.gz.

File metadata

  • Download URL: fabric_platform-0.13.0.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for fabric_platform-0.13.0.tar.gz
Algorithm Hash digest
SHA256 c99fbf04df8a6442544ec42f0bcf75b8829adf7632b349053eff595133374cc0
MD5 04f4fec18c5f17da2bbf30b6e886edc1
BLAKE2b-256 3714095f9f4fb83a7b38077f741f4ea173af54e6e07f81ab706fa6750e20112b

See more details on using hashes here.

File details

Details for the file fabric_platform-0.13.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fabric_platform-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 275103d1eb58f792c1f6a6cf6ac6116a4e2dce4f0202bb5d8f81c0988a9defec
MD5 017e7ce13f442bd1d28f3b4c7cc455dd
BLAKE2b-256 7b8bca61958e8e5fa1f7d40d0aa1e0c058c28ab12b1546e772721673dd0a0e41

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