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.8.tar.gz (10.7 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.8-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x8_client-0.1.8.tar.gz
  • Upload date:
  • Size: 10.7 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.8.tar.gz
Algorithm Hash digest
SHA256 6bd870e1d468cbf45dc3a82b17f93d136ff47f6be6e0cd56193f65b5c97cb1bd
MD5 09f577584cb53050f580bf8bc715d25e
BLAKE2b-256 bf0e74463cc063eac8f8a09359ce975048fdfa74f3f64135f68768cb668e4ad8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x8_client-0.1.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 35fc19999db9f36f17e544c77e8f6f9205784ec1c601d732d6b0e0ad23c65326
MD5 9b94e85337bf95ec251d3e4297fdaaf7
BLAKE2b-256 ab22d411f6efb6a2a29b6e719ee76df0ab911ef6503d933f465e11eb327314e9

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