Skip to main content

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

MIT

Project details


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.7.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x8_client-0.1.7-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file x8_client-0.1.7.tar.gz.

File metadata

  • Download URL: x8_client-0.1.7.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for x8_client-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9c44ffb2ee7f5d20244446e1d1be5c960e1986d586d9690a8ce4b264417b65a3
MD5 5bfac990d801c8bf4f4c3c8ebd64f683
BLAKE2b-256 bba2e1362efc61b49a96ab04630b9df84cf8419d950d61578ac79869bddb2d2a

See more details on using hashes here.

File details

Details for the file x8_client-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: x8_client-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for x8_client-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4e70d744271b071c7e8e14b886749c42949434467a095773048024216290ec00
MD5 3642745d822aec9059db0bb6fbdffbbe
BLAKE2b-256 6d7b3cd48c444e524fd8d2d5cd530e3d23f886255c8f68109ef167e701583984

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page