Skip to main content

Cloudglue Python SDK

PyPI - Version License Discord

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:

  1. build — verifies the tag matches pyproject.toml, builds the sdist + wheel, runs twine check.
  2. publish — uploads the artifacts to PyPI via OIDC.
  3. github-release — creates a GitHub Release for the tag with auto-generated notes and the .tar.gz + .whl attached.

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, workflow publish.yml, environment pypi.
  • 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

Metadata

Release files for cloudglue 0.7.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudglue 0.7.29
File Size Uploaded Provenance Actions
cloudglue-0.7.29.tar.gz 284.4 kB With provenance Details for cloudglue-0.7.29.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cloudglue 0.7.29
File Interpreter ABI Platform Actions
cloudglue-0.7.29-py3-none-any.whl Python 3 none any Details for cloudglue-0.7.29-py3-none-any.whl

Total release size: 1.0 MB

Release files / cloudglue-0.7.29.tar.gz

Download URL cloudglue-0.7.29.tar.gz
Size 284.4 kB
Tags Source
SHA-256 checksum
How to use checksums
49aa8c3b34e94bb7a5277fd63c8d1e859acd2d5d551b26a1196a07b2c1255f32
BLAKE2b-256 checksum
How to use checksums
f6b8eb813ccdd1c51087f9b67567c737dab9fcfe77a293f3d546c47bc5058fe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / cloudglue-0.7.29-py3-none-any.whl

Download URL cloudglue-0.7.29-py3-none-any.whl
Size 724.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fad45eab205f0bc20235b34aff89d368099d72d121be1a2d08c7363aa07a25f6
BLAKE2b-256 checksum
How to use checksums
5f3ceb6165461e0f9779e11f7b728b2c458c0722fa46be41bc1c274b9f035ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for cloudglue 0.7.29

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cloudglue-0.7.29.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.29 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page