A Python Integration for Transloadit’s file uploading and encoding service.
Project description
Transloadit python-sdk
A Python Integration for Transloadit's file uploading and encoding service.
Intro
Transloadit is a service that helps you handle file uploads, resize, crop and watermark your images, make GIFs, transcode your videos, extract thumbnails, generate audio waveforms, and so much more. In short, Transloadit is the Swiss Army Knife for your files.
This is a Python SDK to make it easy to talk to the Transloadit REST API.
Only Python 3.9+ versions are supported.
Install
pip install pytransloadit
Usage
from transloadit import client
tl = client.Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
assembly = tl.new_assembly()
assembly.add_file(open('PATH/TO/FILE.jpg', 'rb'))
assembly.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
assembly_response = assembly.create(retries=5, wait=True)
print(assembly_response.data.get('assembly_id'))
# or
print(assembly_response.data['assembly_id'])
Example
For fully working examples, take a look at examples/
.
Documentation
See readthedocs for full API documentation.
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
File details
Details for the file pytransloadit-1.0.0.tar.gz
.
File metadata
- Download URL: pytransloadit-1.0.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.9 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967705139a820bdb1339212281fa821d57455b90b4e7b14c761a05b57b74c927 |
|
MD5 | 9c6e94aca7d32c5596538767eb4a21c0 |
|
BLAKE2b-256 | 5d1f8325acdbc0dfc2e70b81fd2a13e14a0e5ba982107fe060a446c3018b7244 |
File details
Details for the file pytransloadit-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pytransloadit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.9 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ef3a7e1eac7bb16efbd8756c25320bcef330f08f83ea8f58ac68cbac4a1a900 |
|
MD5 | 6f4e891afcf1e2d62b5b4b3da9442a8c |
|
BLAKE2b-256 | 839ca0060f65ab160d625e4cb9359b5f3dae7b6dc78e5f0323fe692a4531852c |