Skip to content

Commit d9b06ed

Browse files
Update example syntax to python3
1 parent 1151e1c commit d9b06ed

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

examples/image_resize.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
from __future__ import print_function
2-
31
from transloadit.client import Transloadit
42

5-
tl = Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
3+
tl = Transloadit("TRANSLOADIT_KEY", "TRANSLOADIT_SECRET")
64
ass = tl.new_assembly()
7-
ass.add_file(open('fixtures/lol_cat.jpg', 'rb'))
8-
ass.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
5+
ass.add_file(open("fixtures/lol_cat.jpg", "rb"))
6+
ass.add_step("resize", "/image/resize", {"width": 70, "height": 70})
97
response = ass.create(wait=True)
108

11-
result_url = response.data.get('results').get('resize')[0].get('ssl_url')
12-
print('Your result:', result_url)
9+
result_url = response.data.get("results").get("resize")[0].get("ssl_url")
10+
print("Your result:", result_url)

0 commit comments

Comments
 (0)