Skip to main content

A Python wrapper around the Kpler client API

Project description

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 :

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

# 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"],
    with_intra_country=True, - timedelta(days=7),

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kpler.sdk-1.0.26.tar.gz (58.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page