mstrio.distribution_services.device package

Submodules

mstrio.distribution_services.device.device module

class mstrio.distribution_services.device.device.Device(connection: Connection, name: str = None, id: str = None)

Bases: mstrio.utils.entity.Entity, mstrio.utils.entity.DeleteMixin

Devices are Distribution Services components that specify the format

and transmission process of subscribed reports and documents. They are instances of transmitters that contain specific settings specific to a user’s environments.

name

name of the device

id

identifier of the Device

description

description of the device

device_type

type of the Device, DeviceType Enum

transmitter

information of Transmitter attached

device_properties

properties of the device, different for every device type

ancestors

List of ancestor folders

type

Object type. Enum

subtype

Object subtype

ext_type

Object extended type.

date_created

Creation time, DateTime object

date_modified

Last modification time, DateTime object

owner

User object that is the owner

version

Object version ID

acg

Access rights (See EnumDSSXMLAccessRightFlags for possible values)

acl

Object access control list

alter(name: Optional[str] = None, description: Optional[str] = None, device_properties: Optional[Union[mstrio.utils.helper.Dictable, dict]] = None)

Alter the device object properties.

Parameters
  • name – device object name

  • description – device object description

  • device_properties – properties of the device, specific for each device type

classmethod create(connection: Connection, name: str, device_type: Union[mstrio.distribution_services.device.device.DeviceType, str], transmitter: Union[mstrio.distribution_services.transmitter.transmitter.Transmitter, str], device_properties: Union[dict, mstrio.utils.helper.Dictable], description: str = None) Device

Create a new device.

Parameters
  • connection – MicroStrategy connection object returned by connection.Connection()

  • name – device object name

  • device_type – type of the device

  • transmitter – Transmitter object

  • description – device object description

  • device_properties – properties of the device

Returns

Device object.

update_properties() None

Save compatible local changes of the object attributes to the I-Server.

Raises

requests.HTTPError – if I-Server raises exception

class mstrio.distribution_services.device.device.DeviceType(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

ALL = 'all'
ANDROID = 'android'
EMAIL = 'email'
FILE = 'file'
FTP = 'ftp'
IPAD = 'ipad'
IPHONE = 'iphone'
PRINTER = 'printer'
UNSUPPORTED = 'unsupported'
mstrio.distribution_services.device.device.list_devices(connection: Connection, to_dictionary: bool = False, limit: int = None, **filters) Union[List[Device], List[dict]]

Get list of Device objects or dicts. Optionally filter the devices by specifying filters.

Parameters
  • connection – MicroStrategy connection object returned by connection.Connection()

  • to_dictionary – If True returns dict, by default (False) returns Device objects.

  • limit – limit the number of elements returned. If None (default), all objects are returned.

  • **filters – Available filter parameters: [‘id’, ‘name’, ‘description’, ‘date_created’, ‘date_modified’, ‘acg’]

Examples

>>> list_devices(connection, name='device_name')

mstrio.distribution_services.device.device_properties module

class mstrio.distribution_services.device.device_properties.AndroidDeviceProperties(package_name: str, server: Optional[str] = None, port: Optional[int] = None, auth_key: Optional[str] = None, collapse_key: Optional[str] = None, delay_with_idle: bool = False, notification_active_hours: Optional[int] = None, use_proxy: bool = False, proxy_server: Optional[str] = None, proxy_port: Optional[int] = None)

Bases: mstrio.utils.helper.Dictable

Device properties for android device type.

package_name

Mobile Application Package name

server

Firebase cloud messaging service server name/IP address

port

Firebase cloud messaging service Port number, default: 0

auth_key

Firebase cloud messaging service Authentication Key

collapse_key

Firebase cloud messaging service Collapse Key

delay_with_idle

Whether to use Delay with idle

notification_active_hours

Notification active for hours, 1 to 99999

use_proxy

Whether to use Proxy for Firebase cloud messaging

proxy_server

Firebase cloud messaging proxy service server name/IP address

proxy_port

Firebase cloud messaging proxy service Port number

class mstrio.distribution_services.device.device_properties.BackupPrinterProperties(print_on_backup: bool = False, backup_location_type: Optional[Union[mstrio.distribution_services.device.device_properties.PrinterBackupLocationType, str]] = None, backup_printer_location: Optional[str] = None, backup_file_location: Optional[str] = None)

Bases: mstrio.utils.helper.Dictable

Printer Backup Setting.

print_on_backup

Whether to print on Backup printer if primary printer fails, default: False

backup_location_type

Backup device type, PrinterBackupLocationType class

backup_printer_location

Backup Printer Location

backup_file_location

Backup File Location

class mstrio.distribution_services.device.device_properties.ConnectionParameters(retries_count: int = 5, seconds_between_retries: int = 3, delivery_timeout_seconds: int = 10)

Bases: mstrio.utils.helper.Dictable

Connection Parameters

retries_count

Number of Retries, default: 5

seconds_between_retries

Time between retries (Seconds), default: 3

delivery_timeout_seconds

Delivery Timeout (Seconds), default: 10

class mstrio.distribution_services.device.device_properties.EmailDeviceProperties(format: Union[str, mstrio.distribution_services.device.device_properties.EmailFormat], mime_settings: Optional[Union[dict, mstrio.distribution_services.device.device_properties.EmailMimeSettings]] = None, smart_host_settings: Optional[Union[dict, mstrio.distribution_services.device.device_properties.EmailSmartHostSettings]] = None)

Bases: mstrio.utils.helper.Dictable

Device properties for email device type.

format

indicates the email format of the email device, EmailFormat enum

mime_settings

MIME settings for MIME email format

smart_host_settings

smart host settings

class mstrio.distribution_services.device.device_properties.EmailEncoding(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

ASCII_7BIT = 'ascii_7bit'
BASE64 = 'base64'
QUOTED_PRINTABLE = 'quoted_printable'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.EmailFormat(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

MIME = 'mime'
UNSUPPORTED = 'unsupported'
UU_ENCODED = 'uu_encoded'
class mstrio.distribution_services.device.device_properties.EmailMessageSensitivity(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

CONFIDENTIAL = 'confidential'
NORMAL = 'normal'
PERSONAL = 'personal'
PRIVATE = 'private'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.EmailMimeSettings(plain_text_html_body_encoding: Union[mstrio.distribution_services.device.device_properties.EmailEncoding, str], text_attachment_encoding: Union[mstrio.distribution_services.device.device_properties.EmailEncoding, str], binary_attachment_encoding: Union[mstrio.distribution_services.device.device_properties.EmailEncoding, str], message_sensitivity: Union[mstrio.distribution_services.device.device_properties.EmailMessageSensitivity, str], us_ascii_encoding: bool = False, non_us_ascii_quotes: bool = False, embed_html_attachments: bool = False, embed_all_attachments: bool = False, embed_adobe_flash_content: bool = False, html_table_position_only: bool = False, css_inline_style: bool = False)

Bases: mstrio.utils.helper.Dictable

MIME settings for MIME email format

plain_text_html_body_encoding

Indicates the encoding for plaintext and HTML body, EmailEncoding enum

text_attachment_encoding

Indicates the encoding for text attachment, only quoted_printable and base64 are supported, EmailEncoding enum

binary_attachment_encoding

Indicates the encoding for text attachment, only quoted_printable and base64 are supported, EmailEncoding enum

message_sensitivity

Indicates the message sensitivity, EmailMessageSensitivity enum

us_ascii_encoding

Whether to use US-ASCII for Subject, Attachments Names and Display Names, default: False

non_us_ascii_quotes

Whether to use put quotes around non US-ASCII Display Names. Enable for Microsoft Outlook 98 and Microsoft Outlook 2000 email client only, default: False

embed_html_attachments

Whether to embed HTML Attachments, default: False

embed_all_attachments

Whether to embed All Attachments, default: False

embed_adobe_flash_content

Whether to embed Adobe Flash Content, default: False

html_table_position_only

Whether to use only table to position elements in HTML (Enabled for Microsoft Outlook 2007), default: False

css_inline_style

Whether to use inline style CSS, default: False

class mstrio.distribution_services.device.device_properties.EmailSmartHostSettings(server: Optional[str] = None, port: Optional[int] = None, always_use_smart_host: bool = False, smart_host_username: Optional[str] = None, smart_host_password: bool = False)

Bases: mstrio.utils.helper.Dictable

Smart host settings

server

Server Name or IP Address

port

Port number, default: 25

always_use_smart_host

Whether to always use smart host, default: 25

smart_host_username

Smart Host Username

smart_host_password

Smart Host Password

class mstrio.distribution_services.device.device_properties.FileDeviceProperties(file_location: Union[mstrio.distribution_services.device.device_properties.FileLocation, dict], file_system: Union[mstrio.distribution_services.device.device_properties.FileSystem, dict], connection_parameters: Union[mstrio.distribution_services.device.device_properties.ConnectionParameters, dict], file_properties: Union[mstrio.distribution_services.device.device_properties.FileProperties, dict], unix_windows_sharity: Union[mstrio.distribution_services.device.device_properties.UnixWindowsSharity, dict])

Bases: mstrio.utils.helper.Dictable

Device properties for file device type.

file_location

File Location Setting, FileLocation class

file_system

File System Options, FileSystem class

connection_parameters

Connection Parameters, ConnectionParameters class

file_properties

File related properties, FileProperties class

unix_windows_sharity

Unix to Windows Sharity settings, UnixWindowsSharity class

class mstrio.distribution_services.device.device_properties.FileEncoding(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

COMPRESS = 'compress'
ENCRYPT = 'encrypt'
NO_ENCRYPT_COMPRESS = 'no_encrypt_compress'
class mstrio.distribution_services.device.device_properties.FileLocation(file_path: str, append_user_path: bool = False, use_backup_location: bool = False, backup_file_path: Optional[str] = None)

Bases: mstrio.utils.helper.Dictable

File Location Setting

file_path

File Location

append_user_path

Whether to allow and append user entered path, default: False

use_backup_location

Whether to use backup location, default: False

backup_file_path

Backup File Location

class mstrio.distribution_services.device.device_properties.FileProperties(read_only: bool = True, archive: bool = False, index: bool = False, file_encoding: Optional[Union[mstrio.distribution_services.device.device_properties.FileEncoding, str]] = None, unix_access_rights: Optional[str] = None)

Bases: mstrio.utils.helper.Dictable

File related properties

read_only

Whether to enable read only access for file, default: True

archive

Whether to archive the file, default: False

index

Whether to index the file, default: False

file_encoding

File Encoding, FileEncoding enum

unix_access_rights

UNIX access rights

class mstrio.distribution_services.device.device_properties.FileSystem(create_folder: bool = True, filename_append_time_stamp: bool = True, override_filename: bool = False, append_to_file: bool = False)

Bases: mstrio.utils.helper.Dictable

File System Options

create_folder

Whether to create required folder in the path, default: True

filename_append_time_stamp

Whether to append timestamp to the file name, default: True

override_filename

Whether to override filename with same name, default: False

append_to_file

Whether to append to the file, default: False

class mstrio.distribution_services.device.device_properties.FtpDeviceProperties(server_settings: Union[mstrio.distribution_services.device.device_properties.FtpServerSettings, dict], file_system: Union[mstrio.distribution_services.device.device_properties.FileSystem, dict])

Bases: mstrio.utils.helper.Dictable

Device properties for ftp device type.

server_settings

FTP Server Settings, FtpServerSettings class

file_system

File System Options, FileSystem class

class mstrio.distribution_services.device.device_properties.FtpProtocol(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

FTP = 'ftp'
FTP_OVER_SSL_TLS_EXPLICIT = 'ftp_over_ssl_tls_explicit'
FTP_OVER_SSL_TLS_IMPLICIT = 'ftp_over_ssl_tls_implicit'
SFTP = 'sftp'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.FtpServerSettings(protocol: Union[mstrio.distribution_services.device.device_properties.FtpProtocol, str], port: int, path: str, host: Optional[str] = None, passive_mode: bool = True, max_connections: int = - 1, ascii_mode: bool = True, user_name: Optional[str] = None, password: Optional[str] = None)

Bases: mstrio.utils.helper.Dictable

FTP Server Settings

protocol

FTP Protocol, FtpProtocol enum

host

FTP Host IP Address

port

Port number

path

FTP Path

passive_mode

Whether to use Passive Mode for connection, default: True

max_connections

Maximum connection, default: -1

ascii_mode

Whether to use ASCII Mode File Type for connection, default: True

user_name

FTP Account Username

password

FTP Account Password

class mstrio.distribution_services.device.device_properties.IOSDeviceProperties(app_id: str = '', server: Optional[str] = None, port: Optional[int] = None, provider_certificate: Optional[str] = None, feedback_service_server: Optional[str] = None, feedback_service_port: Optional[int] = None)

Bases: mstrio.utils.helper.Dictable

Device properties for ipad and iphone device types.

app_id

Application ID

server

Push notification server name, default: ‘gateway.push.apple.com’

port

Port number, default: 2195

provider_certificate

Provider Certificate file location on server

feedback_service_server

Feedback Service server name, default: ‘feedback.push.apple.com’

feedback_service_port

Feedback Service Port number, default: 2195

class mstrio.distribution_services.device.device_properties.PdfApplicationPriority(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

I_SERVER = 'i_server'
OTHER = 'other'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.PdfOddEvenPages(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

ALL_PAGES = 'all_pages'
EVEN_PAGES = 'even_pages'
ODD_PAGES = 'odd_pages'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.PrinterBackupLocationType(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

FILE = 'file'
PRINTER = 'printer'
class mstrio.distribution_services.device.device_properties.PrinterDeviceProperties(printer_location: Union[mstrio.distribution_services.device.device_properties.PrinterLocation, dict], printer_properties: Union[mstrio.distribution_services.device.device_properties.PrinterProperties, dict], connection_parameters: Union[mstrio.distribution_services.device.device_properties.ConnectionParameters, dict], backup_printer_properties: Union[mstrio.distribution_services.device.device_properties.BackupPrinterProperties, dict], temp_file_location: Optional[str] = None)

Bases: mstrio.utils.helper.Dictable

Device properties for printer device type.

printer_location

Printer Location, PrinterLocation class

printer_properties

Printer Properties, PrinterProperties class

connection_parameters

Connection Parameters, ConnectionParameters class

backup_printer_properties

Printer Backup Setting, BackupPrinterProperties class

temp_file_location

Temp File Location during print execution

class mstrio.distribution_services.device.device_properties.PrinterLocation(location: Optional[str] = None, user_defined_location: bool = False)

Bases: mstrio.utils.helper.Dictable

Printer Location.

location

Printer Location

user_defined_location

Whether to allow user defined location, default: False

class mstrio.distribution_services.device.device_properties.PrinterPaperSize(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

A3 = 'a3'
A4 = 'a4'
A4_SMALL = 'a4_small'
A5 = 'a5'
B4 = 'b4'
B5 = 'b5'
EXECUTIVE = 'executive'
FOLIO = 'folio'
LEDGER = 'ledger'
LEGAL = 'legal'
LETTER = 'letter'
LETTER_SMALL = 'letter_small'
STATEMENT = 'statement'
TABLOID = 'tabloid'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.PrinterPaperSource(value)

Bases: mstrio.utils.enum_helper.AutoName

An enumeration.

AUTOMATIC = 'automatic'
MANUAL = 'manual'
UNSUPPORTED = 'unsupported'
class mstrio.distribution_services.device.device_properties.PrinterPdfSettings(post_script_level: int = 2, reverse_pages: bool = False, odd_even_pages: Optional[Union[mstrio.distribution_services.device.device_properties.PdfOddEvenPages, str]] = None, application_priority: Optional[Union[mstrio.distribution_services.device.device_properties.PdfApplicationPriority, str]] = None)

Bases: mstrio.utils.helper.Dictable

PDF printing settings.

post_script_level

Post Script Level, 0 to 9

odd_even_pages

Indicates the odd or even printing of pages, PdfOddEvenPages enum

reverse_pages

Whether to use reverse pages, default: False

application_priority

Indicates the which application should get the priority when another application is using Adobe and IServer is trying to print PDF documents, PdfApplicationPriority enum

class mstrio.distribution_services.device.device_properties.PrinterProperties(pdf_setting: Union[mstrio.distribution_services.device.device_properties.PrinterPdfSettings, dict], quality: Optional[str] = None, scale: int = 100, paper_source: Optional[Union[mstrio.distribution_services.device.device_properties.PrinterPaperSource, str]] = None, paper_size: Optional[Union[mstrio.distribution_services.device.device_properties.PrinterPaperSize, str]] = None)

Bases: mstrio.utils.helper.Dictable

Printer Properties.

pdf_setting

PDF printing settings, PrinterPdfSettings class

quality

Print Quality

scale

Scale in %, default: 100

paper_source

Paper Source, PrinterPaperSource class

paper_size

Paper Size, PrinterPaperSize class

class mstrio.distribution_services.device.device_properties.UnixWindowsSharity(sharity_enabled: bool = False, server_username: Optional[str] = None, server_password: Optional[str] = None, server_mount_root: Optional[str] = None)

Bases: mstrio.utils.helper.Dictable

Unix to Windows Sharity settings

sharity_enabled

Whether to enable delivery from Intelligence Server running on UNIX to Windows, default: False

server_username

IServer Username used for Sharity

server_password

IServer Password used for Sharity

server_mount_root

IServer Mount root folder path for Sharity

Module contents