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.2.tar.gz
(9.0 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
File details
Details for the file x8_client-0.1.2.tar.gz.
File metadata
- Download URL: x8_client-0.1.2.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c59e47f29d4b9fcf9dce617f8666212bca49eed7e1c2080f74bd72fd3ab3f52e
|
|
| MD5 |
1edba66b832833706e511ce2bc38edea
|
|
| BLAKE2b-256 |
777a74793e0fa3a2d9fade6ee9432d02e4791b09e18cd2ae52620813e1f74040
|
File details
Details for the file x8_client-0.1.2-py3-none-any.whl.
File metadata
- Download URL: x8_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.9 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 |
27bb0a0579bb1a469fd785ead7ae010d1fb4a8d24f4146ffe179dc75634b4dfc
|
|
| MD5 |
0ebafc1e3bc1499ecd29083f6dfc3d47
|
|
| BLAKE2b-256 |
4349afacf1a069150c0061cfd87096f9e653fcc44e0c6400575fb40310bd50e2
|