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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphon_client-0.1.2.tar.gz.
File metadata
- Download URL: graphon_client-0.1.2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a015b42044a4323dd332ec8d07f5608cee878e393cfd1c9cf8469b7cd91cdf0
|
|
| MD5 |
4c070428bb0d14592eebecb4138618ed
|
|
| BLAKE2b-256 |
e7fea3f0ec83baa120ad7c51e371e5eb5825779dcd6334bc1c10b1293244fe30
|
File details
Details for the file graphon_client-0.1.2-py3-none-any.whl.
File metadata
- Download URL: graphon_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
113ebf05c2e7293056a6eabf8ef7de1cb2d95c3f8523e8c186af1c67d4f2edff
|
|
| MD5 |
ade46b0f4d29195263a45af9c7e8c455
|
|
| BLAKE2b-256 |
957e692314d845a9bd1a0e093c48906273d34df41b0d9914ec4a61dfd01b1e2f
|