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 Distribution
x8_client-0.1.6.tar.gz
(9.3 kB
view details)
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
x8_client-0.1.6-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file x8_client-0.1.6.tar.gz.
File metadata
- Download URL: x8_client-0.1.6.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9543d8ca6c2872f7c08e6c44ba5bee4ecfad84331268cc9b193b26ebec0d090
|
|
| MD5 |
6f572457d894cc8878054ba9d1a1dfc9
|
|
| BLAKE2b-256 |
677c86ccc6407b72277882a425aecc2966cb46831d9d7330d381022cb2e8fdb7
|
File details
Details for the file x8_client-0.1.6-py3-none-any.whl.
File metadata
- Download URL: x8_client-0.1.6-py3-none-any.whl
- Upload date:
- Size: 10.3 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 |
3aad7d334f5909b94dd6191df8952247c7a64d18ed65076d4722020b28e0ca71
|
|
| MD5 |
85aeeea2cab5116ae4cd7c61b91f79a5
|
|
| BLAKE2b-256 |
52d000c37e98d52d9ad9a66000c0826f66ce8deff5f4635f4c37279919d39f8a
|