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.0.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.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x8_client-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7e40bce2a4c6be792dbeb2222a757fb36b00a91d87dcbaa004baa5b1ee32926b
MD5 bf736c64e828d76b9ec83a7bf3a313dc
BLAKE2b-256 3d5af2a083890cebb925a0d060162ae6aa2324fbf88f864aef1220b3dd2ec358

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x8_client-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38330bfcae090f76ed1f04c88fc36ce0a28ccc71c92c683904e86707e5861198
MD5 9118fc237d3c20137617f34c6d4b3c9a
BLAKE2b-256 28efba7e0ba3cf5fc1c9fd6738dcfe933d6c70d5b326c2ced68c42aa2917ddae

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