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.7+ 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
pytransloadit-0.2.2.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for pytransloadit-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68bd44bb40f5e2993c96800031e4554345ccf21e90b7308032060c95dca90c34 |
|
MD5 | d9b432e749260e3ac72b4ba239991ad7 |
|
BLAKE2b-256 | 24bc544b6b4b8b458477653382b1c865573fc593cab53c249988d92b04e4eaf6 |