transloadit package¶
Submodules¶
transloadit.client module¶
transloadit.assembly module¶
transloadit.template module¶
- class transloadit.template.Template(transloadit, name, options=None)[source]¶
Bases:
OptionBuilderObject representation of a new Template to be created.
- Attributes:
- transloadit (<translaodit.client.Transloadit>):
An instance of the Transloadit class.
- name (str):
The name of the template to be created.
- Constructor Args:
transloadit (<translaodit.client.Transloadit>)
name (str): The name of the template.
- options (Optional[dict]):
Params to send along with the template. Please see https://transloadit.com/docs/api-docs/#4-templates for available options.
transloadit.optionbuilder module¶
- class transloadit.optionbuilder.OptionBuilder(options=None)[source]¶
Bases:
objectObject representation of a new Assembly to be created.
- Attributes:
- transloadit (<transloadit.client.Transloadit>):
An instance of the Transloadit class.
- files (dict):
storage of files to be uploaded. Each file is stored with a key corresponding to its field name when it is being uploaded.
- Constructor Args:
- options (Optional[dict]):
params to send along with the assembly. Please see https://transloadit.com/docs/api-docs/#21-create-a-new-assembly for available options.
transloadit.request module¶
- class transloadit.request.Request(transloadit)[source]¶
Bases:
objectTransloadit tailored HTTP Request object.
- Attributes:
- transloadit (<translaodit.client.Transloadit>):
An instance of the Transloadit class.
- Constructor Args:
transloadit (<transloadit.client.Transloadit>)
- HEADERS = {'Transloadit-Client': 'python-sdk:1.0.4'}¶
- delete(path, data=None)[source]¶
Makes a HTTP DELETE request.
- Args:
path (str): URL path to which the request should be made.
data (Optional[dict]): The body of the request.
Return an instance of <transloadit.response.Response>
- get(path, params=None)[source]¶
Makes a HTTP GET request.
- Args:
path (str): URL path to which the request should be made.
params (Optional[dict]): Optional params to send along with the request.
Return an instance of <transloadit.response.Response>
- post(path, data=None, extra_data=None, files=None)[source]¶
Makes a HTTP POST request.
- Args:
path (str): URL path to which the request should be made.
data (Optional[dict]): The body of the request. This would be stored under the ‘params’ field.
- extra_data (Optional[dict]): This is also added to the body of the request but not under the
‘params’ field.
- files (Optional[dict]): Files to upload with the request. This should be a key, value pair of
field name and file stream respectively.
Return an instance of <transloadit.response.Response>
transloadit.response module¶
- class transloadit.response.Response(response)[source]¶
Bases:
objectTransloadit http Response Object
- Attributes:
- data (dict):
Dictionary representation of the returned JSON data.
- status_code (int):
HTTP response status code
- headers (dict):
Dictionary representation of the headers returned from the server.
- Constructor Args:
response (<requests.Response>): The bare response object from the requests library.
- property headers¶
Return the response headers.
- property status_code¶
Return the http status code of the request.