Access Signal Ocean Platform data using Python.
Project description
The Signal Ocean SDK combines the power of Python and Signal Ocean's APIs to give you access to a variety of shipping data available in The Signal Ocean Platform.
Installation
Install the SDK with pip:
pip install signal-ocean
The Signal Ocean SDK depends on the pandas library for some of its data analysis features. Optional pandas dependencies are also optional in this SDK. If you plan to use data frame features like plotting or exporting to Excel, you need to install additional dependencies, for example:
pip install matplotlib openpyxl
For more information refer to pandas documentation.
Getting Started
To use the SDK, you need to create an account in our API Portal and subscribe to an API. Once you have a subscription key, put it inside an environment variable called SIGNAL_OCEAN_API_KEY
.
Now you're ready to fetch some data:
from signal_ocean import PortAPI
port_api = PortAPI()
ports = port_api.get_ports()
print(ports)
If you don't want to use environment variables, want to use different keys for different APIs, or if you want to override the environment variables, you can configure your Connection
when creating the API class:
from signal_ocean import VesselClassAPI, Connection
vessel_class_api = VesselClassAPI(Connection(api_key='YOUR KEY GOES HERE'))
vessel_classes = vessel_class_api.get_vessel_classes()
print(vessel_classes)
All API classes follow this pattern of configuration.
Check the docs for examples covering usage of our other APIs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for signal_ocean-1.0.0b5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 734819aa1a7c70a282b9155e5bca047c085868b16b258d0370f60412f548d6b2 |
|
MD5 | 93c131dcc36f644a997eddcbc33a348f |
|
BLAKE2b-256 | 45dc097f497701c1e62318af4fa840ea4c8a72df2abe4731863f757b35a88b33 |