Metadata-Version: 2.4
Name: x8-client
Version: 0.1.9
Summary: Client library for the x8 video processing API
Author-email: vubakninh <vubakninh@gmail.com>
Project-URL: Homepage, https://github.com/duvu/x8-client
Project-URL: Bug Tracker, https://github.com/duvu/x8-client/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: python-dotenv
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: requests-mock; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: build; extra == "dev"

# x8-client

A Python client library for interacting with the x8 video processing API.

## Installation

```bash
pip install x8-client
```

## Basic Usage

```python
from x8 import APIClient

# Initialize the client
client = APIClient()

# Get articles without videos
articles = client.get_articles_not_made_video(age=7)

# Create a video for an article
from x8.models import Video
video = Video(
    unique_id=articles[0].unique_id,
    target_dir="/my-videos",
    channel_name="My Channel",
    is_vertical=True
)

result = client.make_video(video)
print(f"Video created: {result.video_url}")
```

## Configuration

Create a `.env` file in your project root:

```
API_BASE_URL=https://your-api-url.com
SECRET_KEY=your_secret_key
DEFAULT_TIMEOUT=30
DEFAULT_PAGE_SIZE=10
```

Alternatively, you can provide these values when initializing the client:

```python
client = APIClient(
    base_url="https://your-api-url.com",
    secret_key="your_secret_key"
)
```

## Testing

Run unit tests:
```bash
python run_tests.py
```

Run integration tests (requires API credentials):
```bash
python run_tests.py --integration
```

## License

[MIT](LICENSE)
