SOPHON Encoding API
Project description
sophon-sdk
REST API for submitting, monitoring, and retrieving SOPHON encoding jobs.
Authentication is via Bearer API key or session cookie. All POST endpoints require an Idempotency-Key header. List endpoints use opaque cursor-based pagination.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 0.1.0
- Generator version: 7.21.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://liqhtworks.xyz
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/Liqhtworks/sophon-sdk-python.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/Liqhtworks/sophon-sdk-python.git)
Then import the package:
import sophon_sdk
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import sophon_sdk
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import sophon_sdk
from sophon_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.liqhtworks.xyz
# See configuration.py for a list of all supported configuration parameters.
configuration = sophon_sdk.Configuration(
host = "https://api.liqhtworks.xyz"
)
# Enter a context with an instance of the API client
with sophon_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sophon_sdk.DownloadsApi(api_client)
token = 'token_example' # str | HMAC-signed download token encoding the object key and expiry.
try:
# Download an output file via signed token
api_response = api_instance.download(token)
print("The response of DownloadsApi->download:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DownloadsApi->download: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.liqhtworks.xyz
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DownloadsApi | download | GET /v1/downloads/{token} | Download an output file via signed token |
| HealthApi | healthz | GET /healthz | Liveness probe |
| HealthApi | readyz | GET /readyz | Readiness probe |
| JobsApi | cancel_job | DELETE /v1/jobs/{id} | Cancel a job |
| JobsApi | create_job | POST /v1/jobs | Submit an encoding job |
| JobsApi | get_job | GET /v1/jobs/{id} | Get a single job by ID |
| JobsApi | get_job_output | GET /v1/jobs/{id}/output | Get the encoded output file |
| JobsApi | list_jobs | GET /v1/jobs | List jobs with cursor pagination |
| UploadsApi | cancel_upload | DELETE /v1/uploads/{id} | Cancel an upload session |
| UploadsApi | complete_upload | POST /v1/uploads/{id}/complete | Finalize a chunked upload |
| UploadsApi | create_upload | POST /v1/uploads | Initialize a chunked upload session |
| UploadsApi | get_upload | GET /v1/uploads/{id} | Get upload session status |
| UploadsApi | upload_part | PUT /v1/uploads/{id}/parts/{part_number} | Upload a single chunk |
| WebhooksApi | create_webhook | POST /v1/webhooks | Register a webhook endpoint |
| WebhooksApi | delete_webhook | DELETE /v1/webhooks/{id} | Soft-delete a webhook endpoint |
| WebhooksApi | list_webhooks | GET /v1/webhooks | List active webhook endpoints |
Documentation For Models
- CompleteUploadResponse
- CreateJobOutputOptions
- CreateJobRequest
- CreateUploadRequest
- CreateUploadResponse
- CreateWebhookRequest
- ErrorBody
- ErrorEnvelope
- JobOutputInfo
- JobProfile
- JobProgress
- JobResponse
- JobSourceInfo
- JobSourceType
- JobStatus
- ListJobsResponse
- OutputContainer
- ReadyResponse
- UploadJobSource
- UploadPartResponse
- UploadStatusResponse
- WebhookDeliveryPayload
- WebhookListItem
- WebhookListResponse
- WebhookResponse
Documentation For Authorization
Authentication schemes defined for the API:
bearerApiKey
- Type: Bearer authentication
sessionCookie
- Type: API key
- API key parameter name: sophon_api_session
- Location:
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sophon_sdk-0.1.0.tar.gz.
File metadata
- Download URL: sophon_sdk-0.1.0.tar.gz
- Upload date:
- Size: 51.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b8375bd70e7a515abd7aa97920be8b42a40b568c19da5865e02632287529575
|
|
| MD5 |
7faee2cf1ac7e9599fc1335ab28b217a
|
|
| BLAKE2b-256 |
7d809bb8f5fdc456f083fceab959cbfe57a292590afdcfbc261a0d6c4ace9332
|
Provenance
The following attestation bundles were made for sophon_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on Liqhtworks/sophon-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sophon_sdk-0.1.0.tar.gz -
Subject digest:
3b8375bd70e7a515abd7aa97920be8b42a40b568c19da5865e02632287529575 - Sigstore transparency entry: 1361537221
- Sigstore integration time:
-
Permalink:
Liqhtworks/sophon-sdk-python@17b8feaa0579d3d7c8f73934cbabbb0c141890ae -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Liqhtworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17b8feaa0579d3d7c8f73934cbabbb0c141890ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file sophon_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sophon_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 86.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3c8a41561ca6dce6f39b328ad4dacc1d8f698c92310900b50a06260f9779cbb
|
|
| MD5 |
3d2986bef31aefc9461d8556fc4894fb
|
|
| BLAKE2b-256 |
a889c969559306c8f3cfcdfb47ecf15f7c7cc692aafb5cf34776f5ccc3f6dbfb
|
Provenance
The following attestation bundles were made for sophon_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Liqhtworks/sophon-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sophon_sdk-0.1.0-py3-none-any.whl -
Subject digest:
b3c8a41561ca6dce6f39b328ad4dacc1d8f698c92310900b50a06260f9779cbb - Sigstore transparency entry: 1361537244
- Sigstore integration time:
-
Permalink:
Liqhtworks/sophon-sdk-python@17b8feaa0579d3d7c8f73934cbabbb0c141890ae -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Liqhtworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17b8feaa0579d3d7c8f73934cbabbb0c141890ae -
Trigger Event:
push
-
Statement type: