Skip to main content

CFLabs Python SDK

Project description

CFLabs SDK

Python SDK for interacting with the CFLabs/Octavian API.

Installation

pip install cflabs

Usage

from cflabs import CFLabs

# Initialize the client
client = CFLabs(
    api_key="your-api-key",  # or set CFLABS_API_KEY environment variable
    base_url="https://api.cflabs.com"  # optional, defaults to localhost:8000
)

# Run a prompt by ID
result = client.run(
    var_parameters={"input": "your input"}
)

# Or use a prompt slug
from cflabs import Prompt

prompt = Prompt(slug="my-prompt-slug", client=client)
result = prompt.run(var_parameters={"input": "your input"})

Configuration

The SDK can be configured using:

  • Constructor arguments
  • Environment variables: CFLABS_API_KEY

Requirements

  • Python >= 3.8
  • requests >= 2.31.0

License

MIT

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

cflabs-0.1.4.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

cflabs-0.1.4-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file cflabs-0.1.4.tar.gz.

File metadata

  • Download URL: cflabs-0.1.4.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cflabs-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8abb3c2986c2f0d1cccaa9aee7d36262608955a7eea7b58113534fd7bd7c4757
MD5 8f343279dcfd14c0b318ad09d9ae0d47
BLAKE2b-256 3ab45a8cc177f8d159c879ea4ab635e0d1a59b68247f8ef532dd9cdc2e3c9349

See more details on using hashes here.

Provenance

The following attestation bundles were made for cflabs-0.1.4.tar.gz:

Publisher: publish-pypi.yml on chainforge-ai/sdk_octavian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cflabs-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: cflabs-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cflabs-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fd52525052b36eb2938dc9f1e2785d68cb9087079c57ec9272f84a49e3aa5076
MD5 789d3e8059bfae127e7ae5c14ee6a6b0
BLAKE2b-256 ccf0733c57860f8178d06009cdd77b40b6db20f6096d5cfa6878bb1408cbe47d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cflabs-0.1.4-py3-none-any.whl:

Publisher: publish-pypi.yml on chainforge-ai/sdk_octavian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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