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

Uploaded Python 3

File details

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

File metadata

  • Download URL: x8_client-0.1.9.tar.gz
  • Upload date:
  • Size: 9.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.9.tar.gz
Algorithm Hash digest
SHA256 83a4d22e21b15a1b04f2fce1de76689062781d0792fad184bb1efb0616626b7d
MD5 1d8731ae0bcf9390fe2d2d1d00b87866
BLAKE2b-256 c81fd2b6ea623eb7b8da16d56ff2aab8004e48857177e40a9627b031124502b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x8_client-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 1e9e05d9d633d024c44e5e880cc818d76423bf4403961db38bda777c5670b7c3
MD5 4bc6c6dfd06f79ca1bc6dc747492dc29
BLAKE2b-256 80192acca0861fb2995c021fee75daaedecabfd5895142c12da1a8d088faf2f7

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