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

Uploaded Python 3

File details

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

File metadata

  • Download URL: x8_client-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f00b3daeddcdfb939490b178e8d7b3a62919138bb7d62cf65e1db8688f2d900a
MD5 0d1ed1bc92e75e0a9c68a75a1b301ec8
BLAKE2b-256 e684656833f4145377fbe8c311f70c21060b5c10e873198d7cf1c9997299582e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x8_client-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c896d8ccde6c2f2d50e0b7b503d02bfedef542cd8d74f4b07c658002699c38a9
MD5 a70d0ad0980ffc53cfbd94545401c273
BLAKE2b-256 9c50420b4624a3ec09c28db1e863bef7081e1599d8b7af91ad40ad999d0d18a5

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