Skip to main content

A Python client library for the Graphon API

Project description

Graphon Client

A Python client library for interacting with the Graphon API for video indexing and querying.

Installation

pip install graphon-client

Usage

from graphon_client import GraphonClient

# Initialize the client
client = GraphonClient(token="your-api-token")

# Index a video file
job_id = client.index("path/to/your/video.mp4")

# Wait for indexing to complete
client.wait_for_completion(job_id)

# Query the indexed video
result = client.query(job_id, "What topics are discussed in this video?")
print(result)

API Reference

GraphonClient

__init__(token: str)

Initialize the client with your API token.

index(video_file_path: str, show_progress: bool = True) -> str

Upload and index a video file. Returns a job ID.

get_status(job_id: str) -> dict

Get the current status of an indexing job.

query(job_id: str, query_text: str) -> dict

Query a completed index with a text question.

wait_for_completion(job_id: str, poll_interval: int = 10)

Wait for an indexing job to complete, polling at regular intervals.

Requirements

  • Python 3.7+
  • requests >= 2.25.0

License

MIT License

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

graphon_client-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

graphon_client-0.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file graphon_client-0.1.1.tar.gz.

File metadata

  • Download URL: graphon_client-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for graphon_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f0e1edb58ef1f6678145a1818080e4e33de0914b8057d8a45fe33463393cde71
MD5 f11cfde5bf7d22ec8ebb690d5aa8de9b
BLAKE2b-256 6ee2c1fd1b9ae34743ccef845166505ada85e5a58cfbe0069b5e051f4d255387

See more details on using hashes here.

File details

Details for the file graphon_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: graphon_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for graphon_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5eab553b91a85e44a7efa8e5ad3a59bda148830766f491d37a9d218b8381e41f
MD5 76cf48e3589e01d88fc3c88d32a11fd5
BLAKE2b-256 443d66ef686653576aec2eb37d1582feb8f73935f16d681b8f8d8143f5552684

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