\r\n

51Degrees Pipeline Python  4.2

51Degrees Pipeline for Python
  • pipeline-python
  • fiftyone_pipeline_engines_fiftyone
  • fiftyone_pipeline_engines_fiftyone
  • share_usage
  • ShareUsage

pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage Class Reference

Inheritance diagram for pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage:

[legend]

Collaboration diagram for pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage:

[legend]

Public Member Functions

def  __init__ (self, interval=100, requested_package_size=10, cookie=None, query_whitelist=[], header_blacklist=[], share_percentage=100)
Constructor for ShareUsage element. More...
def  get_evidence_key_filter (self)
The share useage element comes with its own evidence key filter that uses the whitelists and blacklists to determine which evidence to share. More...
def  share_send_usage (self)
Internal method to send the share usage bundle to the 51Degrees servers.
def  add_to_share_usage (self, key)
Internal method which adds to the share usage bundle (generating XML) @type key: dict. More...
def  process_internal (self, flow_data)
Internal process method which uses the ShareUsageTracker to determine whether to add usage data to a batch and adds it if necessary. More...

Public Attributes

 query_whitelist
 header_blacklist
 datakey
 interval
 requested_package_size
 cookie
 share_percentage
 tracker
 share_percentage_counter
 share_data
 shareData

Constructor & Destructor Documentation

◆ __init__()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.__init__ (   self,
  interval = 100,
  requested_package_size = 10,
  cookie = None,
  query_whitelist = [],
  header_blacklist = [],
  share_percentage = 100  
)

Constructor for ShareUsage element.

@type interval: int

Parameters
interval - how often to send (seconds) @type requested_package_size: int
requested_package_size - how many items in one zipped packaged @type cookie: string
cookie - which cookie is used to track evidence @type query_whitelist: list
query_whitelist - list of query string whitelist evidence to keep @type query_blacklist: list
query_blacklist - list of header evidence to exclude @type share_percentage: number of requests to share
share_percentage - : int

Member Function Documentation

◆ add_to_share_usage()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.add_to_share_usage (   self,
  key  
)

Internal method which adds to the share usage bundle (generating XML) @type key: dict.

Parameters
key - key value store of current evidence in FlowData (filtered by the ShareUsageEvidenceKeyFilter)

◆ get_evidence_key_filter()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.get_evidence_key_filter (   self )

The share useage element comes with its own evidence key filter that uses the whitelists and blacklists to determine which evidence to share.

◆ process_internal()

def pipeline-python.fiftyone_pipeline_engines_fiftyone.fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage.process_internal (   self,
  flow_data  
)

Internal process method which uses the ShareUsageTracker to determine whether to add usage data to a batch and adds it if necessary.

@type flow_data: FlowData

Parameters
flow_data - FlowData to process