Skip to main content

API client for StreamPot.io

Project description

PyPI Tests Changelog License

Installation

Install this library using pip:

pip install streampot

Usage

Here's a simple example that converts a video file to an audio file:

from streampot import StreamPot

client = StreamPot(secret='yourToken')

job = client.input('https://download.samplelib.com/mp4/sample-5s.mp4') \
    .output('audio.mp3') \
    .run_and_wait()

print(job.outputs['audio.mp3'])

If you want to run the job in the background, you can use the run method:

job = client.input('https://download.samplelib.com/mp4/sample-5s.mp4') \
    .output('audio.mp3') \
    .run()

And fetch the job info using the get_job method:

job = client.get_job(job.id)

print(job.status)
print(job.outputs['audio.mp3'])  # output url by file name
print(job.logs)  # error logs if any
print(job.created_at)
print(job.completed_at)

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd streampot
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

streampot-0.3.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

streampot-0.3.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file streampot-0.3.2.tar.gz.

File metadata

  • Download URL: streampot-0.3.2.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for streampot-0.3.2.tar.gz
Algorithm Hash digest
SHA256 3a89cb079d2045dbde1e02167dd75a6e787bb76625ba144048c4f6f699a1ca09
MD5 e2c812eb4f14caf87f097f8e891df70d
BLAKE2b-256 ece142c73655a2c2964327105388ca139dd2b9acfdd9e2f27905a6887234e287

See more details on using hashes here.

File details

Details for the file streampot-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: streampot-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for streampot-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 01eb7965e36ad5be5e0a40ca9cc7f994feb9aed2ce4a97752ecc4af7089d1c84
MD5 cb53345498c7b3b254f4c33838b88925
BLAKE2b-256 b2511cda6ecbf4ebabd1b0e2cec4741be0ab46083eb0026b171d743c394b7b6d

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