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.2.tar.gz
(3.1 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.2.tar.gz.
File metadata
- Download URL: cflabs-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a39a2f2e8aa916d11001ed051d1322952ca8007159e765b7ab0cbed7ed7deb53
|
|
| MD5 |
ccef78d08070c2628782b30e5ee99383
|
|
| BLAKE2b-256 |
f7ab22db5a2985db7312507975d6a0d22a8b97f6d8fc24734b75dab6c09462e0
|
File details
Details for the file cflabs-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cflabs-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.0 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 |
8448b0316e8ae88b241d241b9d5deba87dbbf0045d7803f3a97cad8d3d5b5283
|
|
| MD5 |
e51e8e692beb3fe8497a416beefc33fc
|
|
| BLAKE2b-256 |
8f20d546e0f069f4ca2342e9283e0d14c5d1108b7918ecbc46a38dfb052498eb
|