The Kpler Python SDK provides access to Kpler data.
It can be easily integrated into notebooks, scripts, and applications.
It is available to all Kpler API clients (credentials required)
Documentation : https://python-sdk.dev.kpler.com
from kpler.sdk import Platform
from kpler.sdk.configuration import Configuration
from kpler.sdk.resources.trades import Trades
from datetime import date, timedelta
# Create configuration object
configuration = Configuration(Platform.Liquids, "<your email>", "<your password>")
# To change the platform use _change_platform method of Configuration class
configuration._change_platform(Platform.Liquids)
# Connect to one of the Kpler's client using your configuration object, ie: Trades
trades_client = Trades(configuration)
# Get all possible columns returned by the get_trades query
trades_columns = trades_client.get_columns()
# Do a get trades with default columns and with a maximum size of 5 for the dataframe
trades_df = trades_client.get(size=5)
# Get US imports over last week
us_imports = trades_client.get(
to_zones=["United States"],
products=["crude"],
with_forecast=False,
with_intra_country=True,
start_date=date.today() - timedelta(days=7),
columns=[
"vessel_name",
"closest_ancestor_product",
"closest_ancestor_grade",
"start",
"end",
"origin_location_name",
"destination_location_name",
]
)
Metadata
Release files for kpler-sdk 1.0.64
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kpler_sdk-1.0.64.tar.gz | 66.5 kB | Without provenance | Details for kpler_sdk-1.0.64.tar.gz |
Release files / kpler_sdk-1.0.64.tar.gz
| Download URL | kpler_sdk-1.0.64.tar.gz |
|---|---|
| Size | 66.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53fcf0a1a75b7ef5276683a5e3becefc6f935453c64d06a83ea2118e6aca2e36
|
|
BLAKE2b-256 checksum How to use checksums |
0f7eccfe72c791afe9e97f42e573577ac65d8b380e875501652e952aa77b4944
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for kpler-sdk 1.0.64
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.