Cloudglue Python SDK
Cloudglue makes it easy to turn video into LLM ready data. Official Python SDK for the Cloudglue API.
📖 Resources
By using this SDK, you agree to the Cloudglue Terms of Service and acknowledge our Privacy Policy.
Installation
You can install the Cloudglue Python SDK using pip:
pip install cloudglue
Quick Start
from cloudglue import Cloudglue
# Initialize the client
client = Cloudglue(api_key="your_api_key") # Or use CLOUDGLUE_API_KEY env variable
# Define your messages
messages = [
{"role": "user", "content": "What are aligned video captions?"}
]
# Make an API request
response = client.chat.completions.create(
messages=messages,
model="nimbus-001",
collections=["abc123"], # Assumes collection already exists, otherwise create one first then reference here by collection id
)
# Get the generated text
generated_text = response.choices[0].message.content
print(generated_text)
Development
Prerequisites
- Python 3.10+
- Make (for build tasks)
- Git
Setup
Clone the repository and set up the development environment:
git clone https://github.com/cloudglue/cloudglue-python.git
cd cloudglue-python
brew install openapi-generator
make setup # This will set up the virtual environment
# Initialize the API spec Git submodule
make submodule-init
API Specification
The OpenAPI specification is maintained in a separate repository and included as a Git submodule:
# Update the API spec to the latest version
make submodule-update
# After updating the spec, regenerate the SDK
make generate
Building
make generate # Generate SDK from OpenAPI spec
make build # Build the package
Releasing
Releases are published to PyPI automatically by the
Publish to PyPI GitHub Actions workflow
whenever a v* tag is pushed. It uses
OIDC trusted publishing — no API
tokens are stored anywhere.
To cut a release:
# 1. Bump the version in pyproject.toml (e.g. 0.7.15 -> 0.7.16) and commit it.
# 2. Tag the commit. The tag MUST match the pyproject.toml version, prefixed
# with "v" — the workflow fails fast if they differ.
git tag v0.7.16
git push origin v0.7.16
Pushing the tag triggers, in order:
- build — verifies the tag matches
pyproject.toml, builds the sdist + wheel, runstwine check. - publish — uploads the artifacts to PyPI via OIDC.
- github-release — creates a GitHub Release
for the tag with auto-generated notes and the
.tar.gz+.whlattached.
One-time setup
This is already configured for the cloudglue project, but for reference the
workflow depends on:
- A PyPI trusted publisher
for repo
cloudglue/cloudglue-python, workflowpublish.yml, environmentpypi. - A GitHub Environment named
pypi(repo Settings → Environments).
Manual publishing (fallback)
The legacy token-based path still works if you need to publish outside CI. It
requires a PyPI API token scoped to the
cloudglue project, in ~/.pypirc or via env vars:
make build
TWINE_USERNAME=__token__ TWINE_PASSWORD='pypi-...' make publish
Project Structure
Project directory structure described below:
cloudglue/
├── __init__.py # Main package initialization
├── client/ # Custom client wrapper code
│ └── main.py # Cloudglue class implementation
└── sdk/ # Auto-generated API code
dist/ # Pre-built package dist
spec/ # Git submodule with OpenAPI specification
└── spec/ # Nested spec directory
└── openapi.json # OpenAPI spec file
Contact
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 cloudglue-0.7.24.tar.gz.
File metadata
- Download URL: cloudglue-0.7.24.tar.gz
- Upload date:
- Size: 257.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1911eb5a6b0dc20a8f683a98f344fa9df6b4dfda4cae133160634d4d073bb75
|
|
| MD5 |
047b223a750f3793369bda68d9ce7b47
|
|
| BLAKE2b-256 |
019078e51c71d8df004aeda99ba4ed2b8d98375c6123d7ef91d80de9c23cc54a
|
Provenance
The following attestation bundles were made for cloudglue-0.7.24.tar.gz:
Publisher:
publish.yml on cloudglue/cloudglue-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloudglue-0.7.24.tar.gz -
Subject digest:
e1911eb5a6b0dc20a8f683a98f344fa9df6b4dfda4cae133160634d4d073bb75 - Sigstore transparency entry: 2505811799
- Sigstore integration time:
-
Permalink:
cloudglue/cloudglue-python@7fde78490a3abb44f1f7b2df6feb75796db3a382 -
Branch / Tag:
refs/tags/v0.7.24 - Owner: https://github.com/cloudglue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7fde78490a3abb44f1f7b2df6feb75796db3a382 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cloudglue-0.7.24-py3-none-any.whl.
File metadata
- Download URL: cloudglue-0.7.24-py3-none-any.whl
- Upload date:
- Size: 661.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87f0ec03c3eaae9d3a3377a9f6b1ea0a4b23ac91a0952d07c41b63ac535c1b6b
|
|
| MD5 |
925a8355a3e199bdac32834b729931cc
|
|
| BLAKE2b-256 |
714e9a30e8a26ca3781cab85b3c1c645477f6a684daa77a8bff7798e3784c2cd
|
Provenance
The following attestation bundles were made for cloudglue-0.7.24-py3-none-any.whl:
Publisher:
publish.yml on cloudglue/cloudglue-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloudglue-0.7.24-py3-none-any.whl -
Subject digest:
87f0ec03c3eaae9d3a3377a9f6b1ea0a4b23ac91a0952d07c41b63ac535c1b6b - Sigstore transparency entry: 2505812271
- Sigstore integration time:
-
Permalink:
cloudglue/cloudglue-python@7fde78490a3abb44f1f7b2df6feb75796db3a382 -
Branch / Tag:
refs/tags/v0.7.24 - Owner: https://github.com/cloudglue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7fde78490a3abb44f1f7b2df6feb75796db3a382 -
Trigger Event:
push
-
Statement type: