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.1.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.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streampot-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 be34e0261050e106486aae3a3fce92b11e8da5c134ae615f1ca5d6777c788b2c
MD5 93fcb6efbd4156418c83db93491018d3
BLAKE2b-256 758c36bafc9a12a60442654d529c6a97af85ab66ffda7567e110699e1c3b8bf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streampot-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3ec7070fbc68f513674518a0fe074ff5065b9e792308fd65b83c7bf00f7ebd7
MD5 a9ff1e582eca5a6698e28bd7896e1a00
BLAKE2b-256 34487b69b9983fcd981a9bf675e35600d2dc9f3191a9296294fa54dc1903d7dc

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