vortexasdk.endpoints.vessels

Vessels Endpoint.

Vessels

Vessels(self)

Vessels endpoint.

load_all

Vessels.load_all(self) -> vortexasdk.endpoints.vessels_result.VesselsResult

Load all vessels.

search

Vessels.search(self, term: Union[str, List[str]] = None, ids: Union[str, List[str]] = None, vessel_classes: Union[str, List[str]] = None, vessel_product_types: Union[str, List[str]] = None, vessel_scrubbers: str = 'disabled', exact_term_match: bool = False) -> vortexasdk.endpoints.vessels_result.VesselsResult

Find all vessels matching given search arguments. Search arguments are combined in an AND manner.

Arguments

  • term: The name(s) (or partial name(s)) of a vessel we'd like to search

  • ids: ID or IDs of vessels we'd like to search

  • vessel_classes: vessel_class (or list of vessel classes) we'd like to search. Each vessel class must be one of "tiny_tanker" , "general_purpose" , "handysize" , "handymax" , "panamax", "aframax" , "suezmax" , "vlcc_plus" , "sgc" , "mgc" , "lgc" , "vlgc". Refer to VortexaAPI Vessel Entities for the most up-to-date list of vessel classes.

  • vessel_product_types: A product ID, or list of product IDs to filter on, searching vessels currently carrying these products.

  • vessel_scrubbers: An optional filter to filter on vessels with or without scrubbers. To disable the filter (the default behaviour), enter 'disabled'. To only include vessels with scrubbers, enter 'inc'. To exclude vessels with scrubbers, enter 'exc'.

  • exact_term_match: Search on only exact term matches, or allow similar matches. e.g. When searching for "Ocean" with exact_term_match=False, then the SDK will yield vessels named ['Ocean', 'Ocean Wisdom', ...] etc. When exact_term_match=True, the SDK will only yield the vessel named Ocean.

Returns

List of vessels matching the search arguments.

Examples

  • Let's find all the VLCCs with 'ocean' in their name, or related names.
>>> from vortexasdk import Vessels
>>> vessels_df = Vessels().search(vessel_classes='vlcc', term='ocean').to_df(columns=['name', 'imo', 'mmsi', 'related_names'])

name imo mmsi related_names
0 OCEANIS 9532757 241089000 ['OCEANIS']
1 AEGEAN 9732553 205761000 ['GENER8 OCEANUS']
2 OCEANIA 9246633 205753000 ['OCEANIA'
3 ENEOS OCEAN 9662875 432986000 ['ENEOS OCEAN']
4 OCEAN LILY 9284960 477178100 ['OCEAN LILY']
5 SHINYO OCEAN 9197868 636019316 ['SHINYO OCEAN']
6 NASHA 9079107 370497000 ['OCEANIC']
7 HUMANITY 9180281 422204700 ['OCEAN NYMPH']

Note the term search also looks for vessels with matching related_names

  • Let's find all the vessels currently carrying Crude.
>>> from vortexasdk import Vessels, Products
>>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer]
>>> vessels_df = Vessels().search(vessel_product_types=crude).to_df()

Further Documentation

VortexaAPI Vessel Reference

reference

Vessels.reference(self, id: str) -> Dict

Perform a vessel lookup.

Arguments

  • id: Vessel ID to lookup

Returns

Vessel record matching the ID

Further Documentation:

VortexaAPI Vessel Reference

vortexasdk.endpoints.vessels_result

VesselsResult

VesselsResult(self, _records: List) -> None

Container class that holds the result obtained from calling the Vessels endpoint.

to_list

VesselsResult.to_list(self) -> List[vortexasdk.api.vessel.Vessel]

Represent vessels as a list.

to_df

VesselsResult.to_df(self, columns=None) -> pandas.core.frame.DataFrame

Represent vessels as a pd.DataFrame.

Arguments

  • columns: The vessel features we want in the dataframe. Enter columns='all' to include all features. Defaults to columns = ['id', 'name', 'imo', 'vessel_class'].

Returns

pd.DataFrame of vessels.