Metadata-Version: 2.4
Name: graphon-client
Version: 0.1.2
Summary: A Python client library for the Graphon API
Home-page: https://github.com/arbaazkhan2/graphon-client
Author: Arbaaz Khan
Author-email: Arbaaz Khan <arbaaz@graphon.ai>
Project-URL: Homepage, https://github.com/arbaazkhan2/graphon-client
Project-URL: Bug Reports, https://github.com/arbaazkhan2/graphon-client/issues
Project-URL: Source, https://github.com/arbaazkhan2/graphon-client
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Graphon Client

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

## Installation

```bash
pip install graphon-client
```

## Usage

```python
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
