51Degrees Pipeline Python  4.4

51Degrees Pipeline for Python
  • pipeline-python
  • fiftyone_pipeline_engines
  • fiftyone_pipeline_engines
  • datafile
  • DataFile

pipeline-python.fiftyone_pipeline_engines.fiftyone_pipeline_engines.datafile.DataFile Class Reference

Detailed Description

A datafile used by a FlowElement / Engine to get calculate properties values.

Public Member Functions

def  __init__ (self, flow_element, identifier, update_url_params=None, data=None, path="", temp_directory=tempfile.gettempdir(), create_temp_copy=True, auto_update=True, file_system_watcher=True, polling_interval=30, update_time_maximum_randomisation=10, verify_md5=True, decompress=True, download=True, verify_if_modified_since=True, update_on_start=False)
Constructor for a DataFile. More...
def  get_date_published (self)
Function called to get the date the datafile was published. More...
def  get_next_update (self)
Function called to get the date of the next datafile version. More...
def  refresh (self, identifier)
Function called when datafile has been updated. More...
def  get_update_url (self)
Internal function that constructs the url for the datafile update service to use from the result of get_url_formatter.
def  get_url_formatter (self)
Function that constructs the url for the datafile update service to use.

Public Attributes


Constructor & Destructor Documentation

◆ __init__()

def pipeline-python.fiftyone_pipeline_engines.fiftyone_pipeline_engines.datafile.DataFile.__init__ (   self,
  update_url_params = None,
  data = None,
  path = "",
  temp_directory = tempfile.gettempdir(),
  create_temp_copy = True,
  auto_update = True,
  file_system_watcher = True,
  polling_interval = 30,
  update_time_maximum_randomisation = 10,
  verify_md5 = True,
  decompress = True,
  download = True,
  verify_if_modified_since = True,
  update_on_start = False  

Constructor for a DataFile.

@type flow_element: FlowElement

flow_element - The FlowElement using the datafile @type identifier : string
identifier - : Name of the datafile @type update_url_params: dict
update_url_params - Dictionary containing parameters used to construct the datafile update url @type data: mixed
data - Data to use in the datafile if kept in memory rather than file @type path: string
path - path to the data file itself @type temp_directory: string
temp_directory - temporary file location (defaults to the operating system defualt) @type create_temp_copy: bool
create_temp_copy - whether to copy datafile to temporary location when updating @type auto_update: bool
- auto_update: whether to automatically update the datafile when required @type file_system_watcher: bool
file_system_watcher - whether to check the datafile's path for changes and update the connected FlowElement's data automatically when the file is changed in the operating system @type polling_interval: int
polling_interval - How often to poll for updates to the datafile (minutes) @type update_time_maximum_randomisation : int
update_time_maximum_randomisation - : Maximum randomisation offset in seconds to polling time interval @type verify_md5 : bool
verify_md5 - : whether to check a 'content-md5' header in the data file update service against the datafile to verify its contents @type decompress: bool
- is the datafile gziped when returning from the update service? @type download: bool
download - should the datafile be downloaded or stored in memory @type update_on_start : bool
update_on_start - : When this is set to true the datafile is updated / downloaded immediately on initialisation. This is useful if no initial datafile is present. @type verify_if_modified_since : bool
verify_if_modified_since - : whether to check an "If-Modified-Since" header on the update service against the last datafile update date

Member Function Documentation

◆ get_date_published()

def pipeline-python.fiftyone_pipeline_engines.fiftyone_pipeline_engines.datafile.DataFile.get_date_published (   self )

Function called to get the date the datafile was published.

date: Date the datafile was published

◆ get_next_update()

def pipeline-python.fiftyone_pipeline_engines.fiftyone_pipeline_engines.datafile.DataFile.get_next_update (   self )

Function called to get the date of the next datafile version.

date: Date of the next update

◆ refresh()

def pipeline-python.fiftyone_pipeline_engines.fiftyone_pipeline_engines.datafile.DataFile.refresh (   self,

Function called when datafile has been updated.

Defaults to a refresh method on the attached FlowElement @type identifier : string

identifier - : identifier of the datafile