composer package¶
Subpackages¶
Submodules¶
composer.http_client module¶
-
composer.http_client.
api_url
(api_version, url)[source]¶ Return the versioned path to the API route
Parameters: Returns: The full url to use for the route and API version
Return type:
-
composer.http_client.
delete_url_json
(socket_path, url)[source]¶ Send a DELETE request to the url and return JSON response
Parameters: Returns: The json response from the server
Return type:
-
composer.http_client.
download_file
(socket_path, url, progress=True)[source]¶ Download a file, saving it to the CWD with the included filename
Parameters:
-
composer.http_client.
get_filename
(headers)[source]¶ Get the filename from the response header
Parameters: response (Response) – The urllib3 response object Raises: RuntimeError if it cannot find a filename in the header Returns: Filename from content-disposition header Return type: str
-
composer.http_client.
get_url_json
(socket_path, url)[source]¶ Return the JSON results of a GET request
Parameters: Returns: The json response from the server
Return type:
-
composer.http_client.
get_url_raw
(socket_path, url)[source]¶ Return the raw results of a GET request
Parameters: Returns: The raw response from the server
Return type:
-
composer.http_client.
post_url
(socket_path, url, body)[source]¶ POST raw data to the URL
Parameters: Returns: The json response from the server
Return type:
-
composer.http_client.
post_url_json
(socket_path, url, body)[source]¶ POST some JSON data to the URL
Parameters: Returns: The json response from the server
Return type:
composer.unix_socket module¶
-
class
composer.unix_socket.
UnixHTTPConnection
(socket_path, timeout=60)[source]¶ Bases:
http.client.HTTPConnection
,object