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
Metadata
Release files for streampot 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| streampot-0.3.2.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streampot-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / streampot-0.3.2.tar.gz
| Download URL | streampot-0.3.2.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a89cb079d2045dbde1e02167dd75a6e787bb76625ba144048c4f6f699a1ca09
|
|
BLAKE2b-256 checksum How to use checksums |
ece142c73655a2c2964327105388ca139dd2b9acfdd9e2f27905a6887234e287
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / streampot-0.3.2-py3-none-any.whl
| Download URL | streampot-0.3.2-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01eb7965e36ad5be5e0a40ca9cc7f994feb9aed2ce4a97752ecc4af7089d1c84
|
|
BLAKE2b-256 checksum How to use checksums |
b2511cda6ecbf4ebabd1b0e2cec4741be0ab46083eb0026b171d743c394b7b6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|