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: spinning record GIF generator April 1, 2021
- Building an AI-powered video dubber with Transloadit July 9, 2021
- Build a Reddit video subtitling bot with Transloadit February 10, 2022