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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudglue-0.7.27.tar.gz (282.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloudglue-0.7.27-py3-none-any.whl (722.8 kB view details)

Uploaded Python 3

File details

Details for the file cloudglue-0.7.27.tar.gz.

File metadata

  • Download URL: cloudglue-0.7.27.tar.gz
  • Upload date:
  • Size: 282.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cloudglue-0.7.27.tar.gz
Algorithm Hash digest
SHA256 83f0b7987b84a9940ca893565c4c628a292ca32200ba201d81a2ff472a5f08ad
MD5 a106ee8b8a0170bfae70d82e490a15aa
BLAKE2b-256 3349ff1fe26c6a086cb8299089b6caee77236ff81d42b1d48c2126818565dd66

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudglue-0.7.27.tar.gz:

Publisher: publish.yml on cloudglue/cloudglue-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cloudglue-0.7.27-py3-none-any.whl.

File metadata

  • Download URL: cloudglue-0.7.27-py3-none-any.whl
  • Upload date:
  • Size: 722.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cloudglue-0.7.27-py3-none-any.whl
Algorithm Hash digest
SHA256 1f75d76659a0fa32f2a1519baae96cdcd56595419b9e2544539dc5d927ba9ee3
MD5 d75d5322d1df8102635b30794838cc2f
BLAKE2b-256 d4ccf230cc866ac8cf42c4e781d38722ffc6cde14ee4eb7562d3e3dc9602e69a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudglue-0.7.27-py3-none-any.whl:

Publisher: publish.yml on cloudglue/cloudglue-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.28

2 files

This release

0.7.27 This release

2 files

0.7.26

2 files

0.7.25

2 files

0.7.24

2 files

0.7.23

2 files

0.7.22

2 files

0.7.21

2 files

0.7.20

2 files

0.7.19

2 files

0.7.18

2 files

0.7.17

2 files

0.7.16

2 files

0.7.15

2 files

0.7.14

2 files

0.7.13

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

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