seguro.commands.notifier.main.AttachHTTP

class seguro.commands.notifier.main.AttachHTTP(url, verify_certificate=True)[source]

Bases: AttachHTTP

__init__(url, verify_certificate=True)[source]

Initialize HTTP Object

headers can be a dictionary of key/value pairs that you want to additionally include as part of the server headers to post with

Methods

__init__(url[, verify_certificate])

Initialize HTTP Object

download(**kwargs)

Perform retrieval of the configuration based on the specified request

escape_html(html[, convert_new_lines, ...])

Takes html text as input and escapes it so that it won't

exists([retrieve_if_missing])

Simply returns true if the object has downloaded and stored the attachment AND the attachment has not expired.

http_response_code_lookup(code[, response_mask])

Parses the interger response code returned by a remote call from a web request into it's human readable string version.

invalidate()

Close our temporary file

parse_list(content[, allow_whitespace, unquote])

A wrapper to utils.parse_list() with unquoting support

parse_phone_no(content[, unquote])

A wrapper to utils.parse_phone_no() with unquoting support

parse_url(url)

Parses the URL and returns enough arguments that can allow us to re-instantiate this object.

post_process_parse_url_results(results)

After parsing the URL, this function applies a bit of extra logic to support extra entries like pass becoming password, etc

pprint(content[, privacy, mode, quote, ...])

Privacy Print is used to mainpulate the string before passing it into part of the URL.

quote(content[, safe, encoding, errors])

Replaces single character non-ascii characters and URI specific ones by their %xx code.

schemas()

A simple function that returns a set of all schemas associated with this object based on the object.protocol and object.secure_protocol

split_path(path[, unquote])

Splits a URL up into a list object.

throttle([last_io, wait])

A common throttle control

unquote(content[, encoding, errors])

Replace %xx escapes by their single-character equivalent.

url([privacy])

Returns the URL built dynamically based on specified arguments.

url_parameters(*args, **kwargs)

Provides a default set of args to work with.

urlencode(query[, doseq, safe, encoding, errors])

Convert a mapping object or a sequence of two-element tuples

Attributes

app_desc

app_id

app_url

chunk_size

location

logger

max_detect_buffer_size

max_file_size

mimetype

Returns mime type (if one is present).

name

Returns the filename

path

Returns the absolute path to the filename.

protocol

request_auth

This is primarily used to fullfill the auth keyword argument that is used by requests.get() and requests.put() calls.

request_rate_per_sec

request_timeout

This is primarily used to fullfill the timeout keyword argument that is used by requests.get() and requests.put() calls.

request_url

Assemble a simple URL that can be used by the requests library

secure_protocol

service_name

socket_connect_timeout

socket_read_timeout

strict

tags

template_args

template_kwargs

template_tokens

templates

unknown_filename

unknown_filename_extension

unknown_mimetype

verify_certificate