Python SDK
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.
Related blog posts
- Releasing our official Python SDK August 17, 2017
- Let's Build: Animated Spinning Vinyl GIF Generator April 1, 2021
- Let's Build: AI-powered Video Dubber July 9, 2021
- Let's Build: Reddit video subtitling bot February 10, 2022