tune_reporting.helpers package

Submodules

tune_reporting.helpers.report_reader_base module

tune report_reader_base

class tune_reporting.helpers.report_reader_base.ReportReaderBase(report_url)[source]

Bases: object

Base Abstract class.

Constructor

Parameters:report_url (str) – Download report URL.
count[source]

Count number of row within gather file data.

Returns:Count
Return type:int
data[source]

Provide created reader populated with file data.

read[source]

Get property for TuneManagementRequest Action Name.

report_url[source]

REPORT_URL of completed report on SQS.

tune_reporting.helpers.report_reader_csv module

TUNE Advertiser Report CSV Reader

class tune_reporting.helpers.report_reader_csv.ReportReaderCSV(report_url)[source]

Bases: tune_reporting.helpers.report_reader_base.ReportReaderBase

Helper class for reading reading remote CSV file

The constructor.

Parameters:report_url (str) – Report URL to be downloaded.
next()[source]
pretty_print(limit=0)[source]

Pretty print exported data.

Parameters:limit (int) – Number of rows to print.
read()[source]

Read CSV data provided remote path report_url.

tune_reporting.helpers.report_reader_json module

TUNE Advertiser Report JSON Reader

class tune_reporting.helpers.report_reader_json.ReportReaderJSON(report_url)[source]

Bases: tune_reporting.helpers.report_reader_base.ReportReaderBase

Helper class for reading reading remote JSON file

The constructor.

Parameters:report_url (str) – Report URL to be downloaded.
pretty_print(limit=0)[source]

Pretty print exported data.

Parameters:limit (int) – Number of rows to print.
read()[source]

Read JSON data provided remote path report_url.

tune_reporting.helpers.sdk_config module

TUNE SDK Configuration Class

class tune_reporting.helpers.sdk_config.SdkConfig[source]

Bases: object

Singleton class for reading SDK configuration file.

SDK_CONFIG_FILENAME = 'tune_reporting_sdk.config'
instance = None

tune_reporting.helpers.sdk_exception module

TUNE SDK Exception

exception tune_reporting.helpers.sdk_exception.TuneSdkException(message=None, errors=None)[source]

Bases: exceptions.Exception

Exception raised for errors when using TUNE SDK

Tune SDK exception constructor

Parameters:
  • message (str) – Message describing error.
  • exc (Exception) – Caught exception.
errors[source]

Get property of error object.

tune_reporting.helpers.service_exception module

TUNE Service Exception

exception tune_reporting.helpers.service_exception.TuneSdkException(message=None, errors=None)[source]

Bases: exceptions.Exception

Exception raised for errors when using TUNE SDK

TUNE SDK exception constructor

Parameters:
  • message (str) – Message describing error.
  • exc (Exception) – Caught exception.
errors[source]

Get property of error object.

exception tune_reporting.helpers.service_exception.TuneServiceException(message=None, errors=None)[source]

Bases: exceptions.Exception

Exception raised when error is returned from TUNE Management Service

TUNE Reporting API Service exception constructor

Parameters:
  • message (str) – Message describing error.
  • exc (Exception) – Caught exception.

tune_reporting.helpers.utf8_recorder module

TUNE UTF-8 Recorder

class tune_reporting.helpers.utf8_recorder.UTF8Recoder(file_handle, encoding)[source]

Iterator that reads an encoded stream and reencodes the input to UTF-8

next()[source]

tune_reporting.helpers.utils module

TUNE Shared Helper Functions

tune_reporting.helpers.utils.is_parentheses_balanced(string, i=0, cnt=0)[source]

Check if string has balance parentheses.

Parameters:string (str) – Expression with parentheses.
Returns:True if balanced.
Return type:bool
tune_reporting.helpers.utils.json_convert(json_str)[source]

Convert unicode contents of JSON file to utf-8

Parameters:json_str (str) – JSON string
tune_reporting.helpers.utils.python_check_version(required_version)[source]

Check Python Version :param: required_version

Module contents

tune shared module