angelos.portfolio.utils

Helper utilities for portfolios.

class angelos.portfolio.utils.Definitions

Bases: object

Definitions for portfolios.

REPORT = {'Adult': 'Mature content of sexual nature.', 'Blackmail': 'A message that intimidates you to conform to demands.', 'Conspiracy': 'Conspiracy to commit a crime.', 'Defamation': 'A message which content is defaming or slanderous towards someone.', 'Graphic': 'Undesirable graphic content.', 'Harassment': 'A message is considered to be harassment or stalking.', 'Harmful': 'Promotion of behaviors or actions which harmful if carried out.', 'Hateful': 'A message that is malicious or insulting and spreads hate.', 'Menace': 'A message is intimidating and menacing or contains direct threats.', 'Offensive': 'A message which content is detestable or repulsive.', 'Sedition': 'Sedition to mischief and spread hate or commit crimes.', 'Solicitation': 'Solicitation for criminal purposes.', 'Spam': 'Unsolicited advertisement.', 'Suspicious': 'Professional messages that seem to be deceptive or fraudulent.', 'Unsolicited': 'Unwanted messages you do not wish to receive.'}
SUFFIXES = {'domain': '.dmn', 'entity': '.ent', 'issuer_revoked': '.rev', 'issuer_trusted': '.rst', 'issuer_verified': '.ver', 'keys': '.key', 'network': '.net', 'node': '.nod', 'nodes': '.nod', 'owner_revoked': '.rev', 'owner_trusted': '.rst', 'owner_verified': '.ver', 'privkeys': '.pky', 'profile': '.pfl'}
TYPES = {'domain': (<class 'angelos.document.domain.Domain'>,), 'entity': (<class 'angelos.document.entities.Person'>, <class 'angelos.document.entities.Ministry'>, <class 'angelos.document.entities.Church'>), 'issuer_revoked': (<class 'angelos.document.statements.Revoked'>,), 'issuer_trusted': (<class 'angelos.document.statements.Trusted'>,), 'issuer_verified': (<class 'angelos.document.statements.Verified'>,), 'keys': (<class 'angelos.document.entities.Keys'>,), 'network': (<class 'angelos.document.domain.Network'>,), 'node': (<class 'angelos.document.domain.Node'>,), 'nodes': (<class 'angelos.document.domain.Node'>,), 'owner_revoked': (<class 'angelos.document.statements.Revoked'>,), 'owner_trusted': (<class 'angelos.document.statements.Trusted'>,), 'owner_verified': (<class 'angelos.document.statements.Verified'>,), 'privkeys': (<class 'angelos.document.entities.PrivateKeys'>,), 'profile': (<class 'angelos.document.profiles.PersonProfile'>, <class 'angelos.document.profiles.MinistryProfile'>, <class 'angelos.document.profiles.ChurchProfile'>)}
class angelos.portfolio.utils.Fields

Bases: object

Portfolio field naming.

DOMAIN = 'domain'
ENTITY = 'entity'
ISSUER_REVOKED = 'issuer_revoked'
ISSUER_TRUSTED = 'issuer_trusted'
ISSUER_VERIFIED = 'issuer_verified'
KEYS = 'keys'
NET = 'network'
NODE = 'node'
NODES = 'nodes'
OWNER_REVOKED = 'owner_revoked'
OWNER_TRUSTED = 'owner_trusted'
OWNER_VERIFIED = 'owner_verified'
PRIVKEYS = 'privkeys'
PROFILE = 'profile'
class angelos.portfolio.utils.Groups

Bases: object

Portfolio field configuration groups.

ALL = ('entity', 'profile', 'privkeys', 'keys', 'domain', 'node', 'nodes', 'network', 'issuer_verified', 'issuer_trusted', 'issuer_revoked', 'owner_verified', 'owner_trusted', 'owner_revoked')
CLIENT = ('entity', 'privkeys', 'keys', 'domain', 'nodes')
CLIENT_AUTH = ('entity', 'keys', 'network', 'owner_verified', 'owner_trusted')
ISSUER = ('issuer_verified', 'issuer_trusted', 'issuer_revoked')
OWNER = ('owner_verified', 'owner_trusted', 'owner_revoked')
SERVER = ('entity', 'privkeys', 'keys', 'domain', 'nodes', 'network')
SHARE_MAX_COMMUNITY = ('entity', 'profile', 'keys', 'network', 'owner_verified', 'owner_trusted')
SHARE_MAX_USER = ('entity', 'profile', 'keys', 'owner_verified', 'owner_trusted')
SHARE_MED_COMMUNITY = ('entity', 'profile', 'keys', 'network')
SHARE_MED_USER = ('entity', 'profile', 'keys')
SHARE_MIN_COMMUNITY = ('entity', 'keys', 'network')
SHARE_MIN_USER = ('entity', 'keys')
SIGNER = ('entity', 'privkeys', 'keys')
VERIFIER = ('entity', 'keys')
VERIFIER_REVOKED = ('entity', 'keys', 'issuer_revoked')
class angelos.portfolio.utils.Helper

Bases: object

Portfolio helper utility.

PATH = PurePosixPath('/portfolios')
classmethod group_suffix(group: Tuple[str]) → Tuple[str]

Suffixes of fields from a group.

class angelos.portfolio.utils.MimeTypes

Bases: object

AAC = 'audio/aac'
BMP = 'image/bmp'
CALENDAR = 'text/calendar'
H261 = 'video/h261'
H263 = 'video/h263'
H264 = 'video/h264'
H265 = 'video/h265'
HTML = 'text/html'
JPEG = 'image/jpeg'
MARKDOWN = 'text/markdown'
MP4 = 'video/mp4'
MP4_A = 'audio/mp4'
MPEG = 'video/mpeg'
MPEG_A = 'audio/mpeg'
OGG = 'video/ogg'
PNG = 'image/png'
QUICKTIME = 'video/quicktime'
RTF = 'text/rtf'
TEXT = 'text/plain'
TIFF = 'image/tiff'
VCARD = 'text/vcard'
VORBIS = 'audio/vorbis'
WEBM = 'audio/webm'
WEBP = 'image/webp'
ZIP = 'application/zip'
class angelos.portfolio.utils.ReportType

Bases: object

ADULT = 'Adult'
BLACKMAIL = 'Blackmail'
CONSPIRACY = 'Conspiracy'
DEFAMATION = 'Defamation'
GRAPHIC = 'Graphic'
HARASSMENT = 'Harassment'
HARMFUL = 'Harmful'
HATEFUL = 'Hateful'
MENACE = 'Menace'
OFFENSIVE = 'Offensive'
SEDITION = 'Sedition'
SOLICITATION = 'Solicitation'
SPAM = 'Spam'
SUSPICIOUS = 'Suspicious'
UNSOLICITED = 'Unsolicited'