Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

aviaryhq/cloudglue-python

Open more actions menu

Repository files navigation

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/aviaryhq/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

About

Official Python SDK for Cloudglue API

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.