- Python 3.9 or higher
- Install dependencies from
requirements.txt
:pip install -r requirements.txt
- Doverunner TnP service account (Site ID, Email ID, Access Key required)
This repository provides Python-based server-side sample code for integrating with the Doverunner TnP (Transcoding & Packaging) service Job API.
It demonstrates:
- How to obtain an authentication token using HTTP Basic Authentication
- How to create and configure a Job with:
- Input files (video/audio/subtitles)
- Output definitions
- Transcoding options (Audio/Video)
- DRM and Forensic Watermarking settings
- Packaging formats (HLS, DASH, CMAF)
doverunner/tnp
: Core domain models and API constants used for Job requestdoverunner/tests
: pytest-based test for API integration tests (e.g.,test_tnp_api.py
)README.md
: Project description and usage guide
-
Clone this repository:
git clone https://github.com/doverunner/tnp-request-sample-python.git cd tnp-request-sample-python
-
Install dependencies:
pip install -r requirements.txt
-
Set your credentials in
test_tnp_api.py
:SITE_ID = "<Your SiteID>" EMAIL_ID = "<Your EmailID>" ACCESS_KEY = "<Your AccessKey>" AUTH_TOKEN = "<Bearer valid-token>"
-
Run tests to verify:
pytest doverunner/tests/
If successful, the console should display logs showing the authentication token retrieval and job creation result.
- Doverunner TnP AuthToken API: How to get an authentication token
- Doverunner TnP Guide: API reference including Job, Input, Output, DRM, Packaging, etc.
- How to Use Doverunner’s TnP Service using API?: YouTube guide demonstrating API usage with Postman