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.1.tar.gz (9.0 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.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x8_client-0.1.1.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

Hashes for x8_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e459a8e06b3277d99cb99a1731c637a57585a43fde30e55693cdafdb5b37f338
MD5 ae69f290ea651bd44d511e60fe252784
BLAKE2b-256 c61bab6f57b18a55ca2810278ce13100d3efa707987bc683ab0e31a626ee9f0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x8_client-0.1.1-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

Hashes for x8_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e37d3c584338746d50d516059fcec5a100fbc1674f8267de401bb46d5f71f24
MD5 f9ec8254fe401bdc236a8c43f77843a3
BLAKE2b-256 bb88d537f8d76b21a0d6ec11d0fb44a42b8bac325a3b3aa00ad384523a80f10d

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