vortexasdk.endpoints.corporations
Try me out in your browser:
Corporations
Corporations(self)
Corporations Endpoint.
load_all
Corporations.load_all()
Load all corporations.
search
Corporations.search(
term: typing.Union[str, typing.List[str], NoneType] = None,
exact_term_match: bool = False)
Find all Corporations matching given search terms.
Arguments
-
term: The corporation name(s) we're filtering on
exact_term_match: Search on only exact term matches, or allow similar matches. e.g. When searching for "COS" with
exact_term_match=False
, then the SDK will yield corporations named ['COSCO', 'COSMO OIL'] etc. Whenexact_term_match=True
, the SDK won't yield any results, because no corporations have the exact name "COS".
Returns
List of corporation matching term
Examples
Let's load all corporations
>>> from vortexasdk import Corporations
>>> df = Corporations().search().to_df()
returns
id | name | corporate_entity_type | |
---|---|---|---|
0 | 04f418ee78c1e17744ad653e7815e8e28891ed9ba25a8427030e4478e5c00974 | 3J | ['effective_controller'] |
1 | b6384cf17f1639a64bbff04cfd32257bf732a3a13e4b0532802a9ae84a36be34 | 5XJAPANESE | ['effective_controller'] |
Let's find all corporations with 'do' in the name.
>>> [x.name for x in Corporations().search(term="do").to_list()]
[...]
Further Documentation
VortexaAPI Corporation Reference
reference
Corporations.reference(id: str)
Perform a corporation lookup.
Arguments
- id: Corporation ID to lookup
Returns
Corporation record matching the ID
Further Documentation:
VortexaAPI Corporation Reference
Examples
Corporations().reference(id='12345abcdef') # doctest: +SKIP
vortexasdk.endpoints.corporations_result
CorporationsResult
CorporationsResult(*, records: typing.List,
reference: typing.Dict[str, typing.Any])
Container class that holds the result obtained from calling the Vessels
endpoint.
model_config
to_list
CorporationsResult.to_list()
Represent vessels as a list.
to_df
CorporationsResult.to_df(
columns:
typing.Union[typing_extensions.Literal['all'], typing.List[str], NoneType] = ['id', 'name', 'corporate_entity_type']
)
Represent corporations as a pd.DataFrame
.
Arguments
- columns: The corporation features we want in the dataframe. Enter
columns='all'
to include all features. Defaults tocolumns = ['id', 'name', 'corporate_entity_type']
.
Returns
pd.DataFrame
of corporations.