sailor.assetcentral
Submodules
sailor.assetcentral.constants
sailor.assetcentral.equipment
sailor.assetcentral.failure_mode
sailor.assetcentral.functional_location
sailor.assetcentral.group
sailor.assetcentral.indicators
sailor.assetcentral.location
sailor.assetcentral.model
sailor.assetcentral.notification
sailor.assetcentral.system
sailor.assetcentral.utils
sailor.assetcentral.workorder
Module contents
- sailor.assetcentral.find_equipment(*, extended_filters=(), **kwargs)[source]
Fetch Equipments from AssetCentral with the applied filters, return an EquipmentSet.
This method supports the common filter language explained at Filter Language.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Equipment with the name ‘MyEquipment’:
find_equipment(name='MyEquipment')
Find all Equipment which either have the name ‘MyEquipment’ or the name ‘MyOtherEquipment’:
find_equipment(name=['MyEquipment', 'MyOtherEquipment'])
Find all Equipment with the name ‘MyEquipment’ which are also located in ‘London’:
find_equipment(name='MyEquipment', location_name='London')
Find all Equipment installed between January 1, 2018 and January 1, 2019 in ‘London’:
find_equipment(extended_filters=['installationDate >= "2018-01-01"', 'installationDate < "2019-01-01"'], location_name='London')
- sailor.assetcentral.find_failure_modes(*, extended_filters=(), **kwargs)[source]
Fetch FailureModes from AssetCentral with the applied filters, return an FailureModeSet.
This method supports the usual filter criteria, i.e. - Any named keyword arguments applied as equality filters, i.e. the name of the FailureMode property is checked against the value of the keyword argument. If the value of the keyword argument is an iterable (e.g. a list) then all objects matching any of the values in the iterable are returned.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all FailureModes with name ‘MyFailureMode’:
find_failure_modes(name='MyFailureMode')
Find all FailureModes which either have the name ‘MyFailureMode’ or the name ‘MyOtherFailureMode’:
find_failure_modes(name=['MyFailureMode', 'MyOtherFailureMode'])
If multiple named arguments are provided then all conditions have to match.
Example
Find all FailureModes with name ‘MyFailureMode’ which also have the short description ‘Description’:
find_failure_modes(name='MyFailureMode', short_description='Description')
The
extended_filters
parameter can be used to specify filters that can not be expressed as an equality. Each extended_filter needs to be provided as a string, multiple filters can be passed as a list of strings. As above, all filter criteria need to match. Extended filters can be freely combined with named arguments. Here, too, all filter criteria need to match for a FailureMode to be returned.Example
Find all FailureModes where equipment count higher or equal to 5:
find_failure_modes(extended_filters=['equipments_count >= 5'])
- sailor.assetcentral.find_functional_locations(*, extended_filters=(), **kwargs)[source]
Fetch Functional Locations from AssetCentral with the applied filters, return an FunctionalLocationSet.
This method supports the common filter language explained at Filter Language.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Functional Locations with the name ‘MyFloc’:
find_functional_locations(name='MyFloc')
Find all Functional Locations which either have the name ‘MyFloc’ or the name ‘MyOtherFloc’:
find_functional_locations(name=['MyFloc', 'MyOtherFloc'])
Find all Functional Locations by manufacturer ‘ACME Corp’ which are operated by ‘Operator 42’:
find_functional_locations(manufacturer='ACME Corp', operator='Operator 42')
- sailor.assetcentral.find_groups(*, extended_filters=(), **kwargs)[source]
Fetch Groups from AssetCentral with the applied filters, return a GroupSet.
This method supports the common filter language explained at Filter Language, but the filters are evaluated locally rather than remotely, potentially leading to longer query times.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Groups with the name ‘MyGroup’:
find_groups(name='MyGroup')
Find all Groups which either have the name ‘MyGroup’ or the name ‘MyOtherGroup’:
find_group(name=['MyGroup', 'MyOtherGroup'])
Find all Groups with the name ‘MyGroup’ which are also of type ‘FLEET’:
find_groups(name='MyGroup', group_type='FLEET')
Find all Groups having a risk_value greater than 0:
groups = find_groups(extended_filters=['risk_value > 0'])
- sailor.assetcentral.find_locations(*, extended_filters=(), **kwargs)[source]
Fetch Locations from AssetCentral with the applied filters, return a LocationSet.
This method supports the usual filter criteria, i.e. - Any named keyword arguments applied as equality filters, i.e. the name of the Location property is checked against the value of the keyword argument. If the value of the keyword argument is an iterable (e.g. a list) then all objects matching any of the values in the iterable are returned.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Location with name ‘MyLocation’:
find_locations(name='MyLocation')
Find all Locations which either have the name ‘MyLocation’ or the name ‘MyOtherLocation’:
find_locations(name=['MyLocation', 'MyOtherLocation'])
If multiple named arguments are provided then all conditions have to match.
Example
Find all Locations with name ‘MyLocation’ which also have the location type description ‘Functional Location’:
find_locations(name='MyLocation', type_description='Functional Location')
The
extended_filters
parameter can be used to specify filters that can not be expressed as an equality. Each extended_filter needs to be provided as a string, multiple filters can be passed as a list of strings. As above, all filter criteria need to match. Extended filters can be freely combined with named arguments. Here, too all filter criteria need to match for a Location to be returned.Example
Find all Locations with a short description not matching to ‘Location 1’:
find_locations(extended_filters=['short_description != "Location 1"'])
- sailor.assetcentral.find_models(*, extended_filters=(), **kwargs)[source]
Fetch Models from AssetCentral with the applied filters, return an ModelSet.
This method supports the usual filter criteria, i.e. Any named keyword arguments applied as equality filters, i.e. the name of the Model property is checked against the value of the keyword argument. If the value of the keyword argument is an iterable (e.g. a list) then all objects matching any of the values in the iterable are returned.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Models with name ‘MyModel’:
find_models(name='MyModel')
Find all Models which either have the name ‘MyModel’ or the name ‘MyOtherModel’:
find_models(name=['MyModel', 'MyOtherModel'])
If multiple named arguments are provided then all conditions have to match.
Example
Find all Models with name ‘MyModel’ which also have the short description ‘Description’:
find_models(name='MyModel', short_description='Description')
The
extended_filters
parameter can be used to specify filters that can not be expressed as an equality. Each extended_filter needs to be provided as a string, multiple filters can be passed as a list of strings. As above, all filter criteria need to match. Extended filters can be freely combined with named arguments. Here, too, all filter criteria need to match for an Model to be returned.Example
Find all Models with an expiration date before January 1, 2018:
find_models(extended_filters=['model_expiration_date < "2018-01-01"'])
- sailor.assetcentral.find_notifications(*, extended_filters=(), **kwargs)[source]
Fetch Notifications from AssetCentral with the applied filters, return a NotificationSet.
This method supports the common filter language explained at Filter Language.
Allowed entries for filter terms
- Type of notifications and its meanings
M1: Maintenance Request, M2: BreakDown
- Priorities and its meanings
5: Low, 10: Medium, 15: High, 20: Very High, 25: Emergency
- Status types and its meanings
NEW: New, PBD: Published, CPT: Completed, IPR: InProcess
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all notifications with short_description ‘MyNotification’:
find_notifications(short_description='MyNotification')
Find all notifications which either have the short_description ‘MyNotification’ or the short_description ‘MyOtherNotification’:
find_notifications(short_description=['MyNotification', 'MyOtherNotification'])
Find all notifications with short_description ‘MyNotification’ which also have the start date ‘2020-07-01’:
find_notifications(short_description='MyNotification', start_date='2020-07-01')
Find all notifications with a confirmed failure mode description is not empty:
find_notifications(extended_filters=['confirmed_failure_mode_description != "None"'])
Find all notifications in a given timeframe for specific equipment:
find_notifications(extended_filters=['malfunctionStartDate > "2020-08-01"', 'malfunctionEndDate <= "2020-09-01"'], equipment_id=['id1', 'id2'])
- sailor.assetcentral.find_systems(*, extended_filters=(), **kwargs)[source]
Fetch Systems from AssetCentral with the applied filters, return a SystemSet.
This method supports the usual filter criteria, i.e. - Any named keyword arguments applied as equality filters, i.e. the name of the System property is checked against the value of the keyword argument. If the value of the keyword argument is an iterable (e.g. a list) then all objects matching any of the values in the iterable are returned.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Systems with name ‘MySystem’:
find_systems(name='MySystem')
Find all Systems which either have the name ‘MySystem’ or the name ‘MyOtherSystem’:
find_systems(name=['MySystem', 'MyOtherSystem'])
If multiple named arguments are provided then all conditions have to match.
Example
Find all Systems with name ‘MySystem’ which also is published (status_text = ‘Published’):
find_systems(name='MySystem', status_text='Published')
The
extended_filters
parameter can be used to specify filters that can not be expressed as an equality. Each extended_filter needs to be provided as a string, multiple filters can be passed as a list of strings. As above, all filter criteria need to match. Extended filters can be freely combined with named arguments. Here, too all filter criteria need to match for a System to be returned.Example
Find all Systems with creation date higher or equal to 01.01.2020:
find_systems(extended_filters=['created_on >= "2020-01-01"'])
- sailor.assetcentral.find_workorders(*, extended_filters=(), **kwargs)[source]
Fetch Workorders from AssetCentral with the applied filters, return a WorkorderSet.
This method supports the usual filter criteria, i.e. - Any named keyword arguments applied as equality filters, i.e. the name of the Workorder property is checked against the value of the keyword argument. If the value of the keyword argument is an iterable (e.g. a list) then all objects matching any of the values in the iterable are returned.
- Parameters
extended_filters – See Filter Language.
**kwargs – See Filter Language.
- Return type
Examples
Find all Workorders with name ‘MyWorkorder’:
find_workorders(name='MyWorkorder')
Find all Workorders which either have the name ‘MyWorkorder’ or the name ‘MyOtherWorkorder’:
find_workorders(name=['MyWorkorder', 'MyOtherWorkorder'])
Find all workorders with very high priority:
find_workorders(priority = 20)
If multiple named arguments are provided then all conditions have to match.
Example
Find all workorders with very high priority (20) and has progress status ‘pending’(15)
find_workorders(priority = 20, progressStatus = 15).
The
extended_filters
parameter can be used to specify filters that can not be expressed as an equality. Each extended_filter needs to be provided as a string, multiple filters can be passed as a list of strings. As above, all filter criteria need to match. Extended filters can be freely combined with named arguments. Here, too all filter criteria need to match for a Workorder to be returned.Example
Find all Workorders with start date higher than 2020-01-01:
find_workorders(extended_filters=['start_date >= "2020-01-01"'])