51Degrees Pipeline for Python

fiftyone_pipeline_core.evidence.Evidence Class Reference

Public Member Functions

 __init__ (self, flowdata)
 Constructor for Evidence container on a FlowData.
 add (self, key, value)
 Add a single piece of evidence by its element and value.
 add_from_dict (self, evidence_dictionary)
 Helper function to set multiple pieces of evidence from a dict.
 get (self, key)
 Get a piece of evidence by key.
 get_all (self)
 Get all evidence.
 get_unaccepted (self)
 The evidence filter() set aside, being the keys no FlowElement in the pipeline accepts and the web request itself.
None filter (self)
 Filter evidence using filter_evidence_key and filter_evidence methods of each FlowElement in the pipeline.

Public Attributes

dict evidence = {}
dict keys = {}
bool evidence_filtered = False
 flowdata = flowdata
dict unaccepted = {}

Constructor & Destructor Documentation

◆ __init__()

fiftyone_pipeline_core.evidence.Evidence.__init__ ( self,
flowdata )

Constructor for Evidence container on a FlowData.

@type flowdata: FlowData

Parameters
flowdataParent FlowData

Member Function Documentation

◆ add()

fiftyone_pipeline_core.evidence.Evidence.add ( self,
key,
value )

Add a single piece of evidence by its element and value.

@type key: string

Parameters
keya flowElement's datakey

@type value: mixed

Parameters
valuea piece of evidence

◆ add_from_dict()

fiftyone_pipeline_core.evidence.Evidence.add_from_dict ( self,
evidence_dictionary )

Helper function to set multiple pieces of evidence from a dict.

@type evidence_dictionary: dict

Parameters
evidence_dictionaryDict of evidence

◆ filter()

None fiftyone_pipeline_core.evidence.Evidence.filter ( self)

Filter evidence using filter_evidence_key and filter_evidence methods of each FlowElement in the pipeline.

The keys that do not pass, and the web request under HTTP_REQUEST_KEY, move to get_unaccepted().

◆ get()

fiftyone_pipeline_core.evidence.Evidence.get ( self,
key )

Get a piece of evidence by key.

@type key: string

Parameters
keyA FlowElement's datakey

@rtype: dict

Returns
: A piece of evidence

◆ get_all()

fiftyone_pipeline_core.evidence.Evidence.get_all ( self)

Get all evidence.

@rtype: dict

Returns
: Returns everything in this Evidence.evidence

◆ get_unaccepted()

fiftyone_pipeline_core.evidence.Evidence.get_unaccepted ( self)

The evidence filter() set aside, being the keys no FlowElement in the pipeline accepts and the web request itself.

The usage sharing element accepts no evidence, and shares what it finds here and in get_all().

@rtype: dict

Returns
: The evidence set aside, empty until filter() runs

Member Data Documentation

◆ evidence

fiftyone_pipeline_core.evidence.Evidence.evidence = {}

◆ evidence_filtered

bool fiftyone_pipeline_core.evidence.Evidence.evidence_filtered = False

◆ flowdata

fiftyone_pipeline_core.evidence.Evidence.flowdata = flowdata

◆ keys

dict fiftyone_pipeline_core.evidence.Evidence.keys = {}

◆ unaccepted

dict fiftyone_pipeline_core.evidence.Evidence.unaccepted = {}