vortexasdk.endpoints.storage_terminals

Try me out in your browser:

Binder

StorageTerminals

StorageTerminals(self)

Storage Terminals endpoint.

A Storage Terminal is a reference value that corresponds to an ID associated with other entities.

For example, a storage terminal object may have the following keys:

{
    "name": "Military Oil Depot",
    "parent": {
        "name": "Bandar Khomeini, Bandar Mahshahr [IR]"
    }
    ...
}

These IDs represent storage terminals which can be found via the Storage Terminal reference endpoint.

When the storage terminals endpoint is searched with those ids as parameters:

    >>> from vortexasdk import StorageTerminals
    >>> df = StorageTerminals().search(ids=["08bbaf7a67ab30036d73b9604b932352a73905e16b8342b27f02ae34941b7db5"]).to_df()

Returns

id name lat lon
0 08bbaf7a67ab30036d73... Military Oil Depot 90 180

load_all

StorageTerminals.load_all()

Load all storage terminals.

search

StorageTerminals.search(
  ids: typing.Union[str, typing.List[str], NoneType] = None,
  term: typing.Union[str, typing.List[str], NoneType] = None)

Find all storage terminals matching given term.

Arguments

  • ids: List of storage terminal ids to filter by.
  • term: List of terms to filter on.

Returns

List of storage terminals matching the ids or term specified.

Examples

Find a storage terminal by term, for example the name of the storage terminal.

>>> from vortexasdk import StorageTerminals
>>> df = StorageTerminals().search(term=["Military"]).to_df()

Returns

id name lat lon
0 08bbaf7a67ab30036d73... Military Oil Depot 90 180

vortexasdk.endpoints.storage_terminals_result

StorageTerminalResult

StorageTerminalResult(*, records: typing.List,
                      reference: typing.Dict[str, typing.Any])

Container class that holds the result obtained from calling the Storage Terminals endpoint.

model_config

to_list

StorageTerminalResult.to_list()

Represent storage terminals as a list.

to_df

StorageTerminalResult.to_df(
    columns:
    typing.Union[typing_extensions.Literal['all'], typing.List[str], NoneType] = ['id', 'name', 'lat', 'lon']
)

Represent storage terminals as a pd.DataFrame.

Arguments

  • columns: The storage terminals features we want in the dataframe. Enter columns='all' to include all features. Defaults to columns = ['id', 'name', 'lat', 'lon'].

Returns

pd.DataFrame of storage terminals.