Client library for the x8 video processing API
Project description
x8-client
A Python client library for interacting with the x8 video processing API.
Installation
pip install x8-client
Basic Usage
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:
client = APIClient(
base_url="https://your-api-url.com",
secret_key="your_secret_key"
)
Testing
Run unit tests:
python run_tests.py
Run integration tests (requires API credentials):
python run_tests.py --integration
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 x8_client-0.1.10-py3-none-any.whl.
File metadata
- Download URL: x8_client-0.1.10-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c505d2a7dca53c7fed8655ffc568af1cd94e557d2ee422c811c9ef6a16c8dc6
|
|
| MD5 |
da2f132124bfd2e441be1e819bd10699
|
|
| BLAKE2b-256 |
8b122a5992f879b4ef619c3b8535cbf68e4dc89daf18cd3d9ada50ebc70a4efb
|