Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sophon_sdk-0.1.2.tar.gz (77.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sophon_sdk-0.1.2-py3-none-any.whl (187.8 kB view details)

Uploaded Python 3

File details

Details for the file sophon_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: sophon_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 77.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sophon_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 27d921992281ea992d55c99ca342344ba7c411b78076c589e369dded316bd840
MD5 6cc8abe6ab3d92224e066890b0db2f6c
BLAKE2b-256 ada6e0e5418f144d4a4d497f05f39bc2298ca5c430c504774bf2a7ac3b6a37d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for sophon_sdk-0.1.2.tar.gz:

Publisher: publish.yml on Liqhtworks/sophon-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sophon_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sophon_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 187.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sophon_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50a058d873b4e5f63448a6b8dee6dc07f6317dc50efff2828bf5b648b82e9ff2
MD5 b531c1cfb21ed33d1e173bcb691d9c49
BLAKE2b-256 8b656722dc8d731220972a3144a14dffd4772bd0e3e96ea0a0c368c52668b9c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for sophon_sdk-0.1.2-py3-none-any.whl:

Publisher: publish.yml on Liqhtworks/sophon-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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