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.5.tar.gz
(9.2 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.5-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file x8_client-0.1.5.tar.gz.
File metadata
- Download URL: x8_client-0.1.5.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d416cfa98adbe78027c424b275aba52d33bf557e8edfe7b1d223a2973b1b489f
|
|
| MD5 |
21295f5178c79a82920d3ef6daecc468
|
|
| BLAKE2b-256 |
a76c9ecc69c32c6cf63a978663f0e26e1b94b1fdccef8fb821e63701574920e6
|
File details
Details for the file x8_client-0.1.5-py3-none-any.whl.
File metadata
- Download URL: x8_client-0.1.5-py3-none-any.whl
- Upload date:
- Size: 10.1 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 |
599b45c4b58761b41ecf9e454ec2902e0a7619222b62c9c9bd8e0ad029364403
|
|
| MD5 |
95ba928546cd079f5cf0ccabe13dbb4e
|
|
| BLAKE2b-256 |
9268e64ef402bb4a4714ae70ea4420dcfc9564047e4597944717ae58e158eadd
|