Package Documentation¶
Companies API Package.
Classes:
Name | Description |
---|---|
CompaniesAPI |
Represents Signal's Companies API. |
Company |
Represents a Company. |
CompaniesAPI
¶
Represents Signal's Companies API.
Source code in signal_ocean/companies/companies_api.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
__init__(connection=None)
¶
Initializes CompaniesAPI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connection
|
Optional[Connection]
|
API connection configuration. If not provided, the default connection method is used. |
None
|
Source code in signal_ocean/companies/companies_api.py
15 16 17 18 19 20 21 22 |
|
get_companies(name=None)
¶
Retrieves all available companies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
Optional[str]
|
String to filter and return only companies the name of which contains the provided string. If None, all companies are returned. |
None
|
Returns:
Type | Description |
---|---|
Tuple[Company, ...]
|
A tuple of all available companies. |
Source code in signal_ocean/companies/companies_api.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
get_company(company_id)
¶
Retrieves a company by its id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
company_id
|
int
|
Unique id of the company to retrieve. |
required |
Returns:
Type | Description |
---|---|
Optional[Company]
|
A company or None if no company with the specified id has |
Optional[Company]
|
been found. |
Source code in signal_ocean/companies/companies_api.py
24 25 26 27 28 29 30 31 32 33 34 35 |
|
Company
dataclass
¶
Contains all details of a company.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
Numeric unique ID identifying a maritime company. |
updated_date |
datetime
|
Date, format YYYY-MM-DD HH:MM:SS, corresponding to the latest update. |
company_name |
Optional[str]
|
String, official name of the maritime company. |
website |
Optional[str]
|
String, website of the company. |
fleet_list |
Optional[str]
|
String, link to the fleet list of the company if it has vessels under commercial management. |
synonyms |
Optional[Tuple[str, ...]]
|
Strings representing synonyms, acronyms or other names the company goes by in the shipping market. |
charterer_vessel_types |
Optional[Tuple[str, ...]]
|
String, indicates in which market segments the company operates as charterer. Possible VesselTypes are "Tanker, Dry, Containers, LNG, LPG". |
commercial_operator_vessel_types |
Optional[Tuple[str, ...]]
|
String, indicates in which market segments the company operates as commercial operator, therefore commercially manages vessel. Possible VesselTypes are "Tanker, Dry, Containers, LNG, LPG". |
geo_asset_owner_vessel_types |
Optional[Tuple[str, ...]]
|
String, indicates if the company owns specific facilities such as shipyards or refineries relative to a particular vessel type. Possible VesselTypes are "Tanker, Dry, Containers, LNG, LPG". |
broker_vessel_types |
Optional[Tuple[str, ...]]
|
String, indicates for which market segments the company operates as broker. Possible VesselTypes are "Tanker, Dry, Containers, LNG, LPG". |
port_agent_vessel_types |
Optional[Tuple[str, ...]]
|
String, indicates for which market segments the company operates as port agent. Possible VesselTypes are "Tanker, Dry, Containers, LNG, LPG". |
parent_company_id |
Optional[int]
|
Companies can have parent-child relationships, that is being legally related and having common interests. This numeric ID corresponds to the parent company or umbrella under which the company is. |
children_companies_ids |
Optional[Tuple[int, ...]]
|
ID(s) of all companies acting as children of the initial company. Please note that a company can either have parent or children. We do not support two degrees relationships. |
Source code in signal_ocean/companies/models.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|