Skip to main content

Python SDK for Cloudglue API

Project description

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

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

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

cloudglue-0.7.14.tar.gz (211.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.14-py3-none-any.whl (561.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cloudglue-0.7.14.tar.gz
  • Upload date:
  • Size: 211.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cloudglue-0.7.14.tar.gz
Algorithm Hash digest
SHA256 e9f04d38b15a7b8d8ea4c529a2602285859f8f6ea39bab3f6626a65f17727031
MD5 5e7ae512632e6d2d26159ba92fbc91f9
BLAKE2b-256 9f5c1a0a58aff763991d6af3d95fd0f2e6f41f3a1a5c681c0469ff809bcaa659

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cloudglue-0.7.14-py3-none-any.whl
  • Upload date:
  • Size: 561.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cloudglue-0.7.14-py3-none-any.whl
Algorithm Hash digest
SHA256 be286cfbaf961069b531ab2a8c2fbbcdc6984508fe364b43e92d681486e570c4
MD5 02b2c3ac5e7f0afe49258d6c530a21b1
BLAKE2b-256 9434ac661be0422bdc98f8daa13bcc26db92adda0eb6bb8f1c1a228de04e8127

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page