Shared (nornir_shared)¶
Nornir Shared Package¶
Functions shared across the various Nornir and connectomics packages live in this module.
checksum¶
- nornir_shared.checksum.DataChecksum(data)¶
Removes whitespace from strings before calculating md5 checksum
- Parameters
data (obj) – string, list or object convertible to string
- Returns
md5 checksum
- Rtype str
emaillib¶
- nornir_shared.emaillib.SendMail(**kwargs)¶
Sends an email
- Parameters
host (str) – Address of smpt server
username (str) – username for smtp account if required
password (str) – password for smtp account if required
subject (str) – subject for E-mail
message (str) – text content of message
to (str) – Recipient addresses as string or list of strings
cc (str) – Recipient addresses as string or list of strings
from (str) – Sender’s E-mail address
fromFriendlyAddress (str) – Nice looking Sender’s E-mail address
files (list) – comma delimited list of files to attach
port (int) – port to use on server, default is 25