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(self) -> vortexasdk.endpoints.storage_terminals_result.StorageTerminalResult

Load all storage terminals.

search

StorageTerminals.search(self, ids: Union[str, List[str]] = None, name: Union[str, List[str]] = None) -> vortexasdk.endpoints.storage_terminals_result.StorageTerminalResult

Find all storage terminals matching given type.

Arguments

  • type: The type of storage terminal we're filtering on.

Returns

List of storage terminals matching type

Examples

Find a storage terminal by name.

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

Returns

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

vortexasdk.endpoints.storage_terminals_result

StorageTerminalResult

StorageTerminalResult(self, _records: List) -> None

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

to_list

StorageTerminalResult.to_list(self) -> List[vortexasdk.api.storage_terminal.StorageTerminal]

Represent storage terminals as a list.

to_df

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

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.