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.1.tar.gz
(2.9 kB
view details)
Built Distribution
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 cflabs-0.1.1.tar.gz.
File metadata
- Download URL: cflabs-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f43e44263e6c6b4d46aefdde4cffc4d40cc2040365cd411d5cb47193cc11470
|
|
| MD5 |
61067589cf2fe565987b4c912ddfabab
|
|
| BLAKE2b-256 |
5c0ab2fee420f12fc2a081200ae2fc5dd7e83c4914ad34ff5563cd77333dcece
|
File details
Details for the file cflabs-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cflabs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac3720863a92bc2949eaf65e449e595ba2a3b7df39451a7b4876d48edc972ca5
|
|
| MD5 |
9940b01f712f281a37cab88aad08a944
|
|
| BLAKE2b-256 |
bc1f2bebab04d3d922de3f3ff42a19f6f796ffd34da00d402b6efa3ca6549bf5
|