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.3.tar.gz (13.8 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.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cflabs-0.1.3.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for cflabs-0.1.3.tar.gz
Algorithm Hash digest
SHA256 68ce55643cfe637e1acb1525eed53fbf2d54638203352dc25e5b79e791fe8776
MD5 e47b2fc5737fff57249df8b507da96a5
BLAKE2b-256 5f0d9f575fc3f8a125122330303fbc027bb5001f0ad0ff4c461515d02594495d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cflabs-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for cflabs-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4e04f930b8306ea658733be16cefb00360d01d3864e97f6d254d2c4f86c74507
MD5 5cb369c64382594d045aad6f99eb8ff5
BLAKE2b-256 e6d8644a9291452a4e7f316e6acc1a05f2347004cfd6208a37cc042c8291ba0f

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