Skip to content

Releases: OilpriceAPI/python-sdk

v1.6.0 — Currency fix + auto-pagination

18 Mar 11:18

Choose a tag to compare

Fixes

  • Currency preservation in to_dataframe(): Fixed bug where all commodities showed USD regardless of actual currency. EUR, GBP, and other currencies now correctly preserved.
  • Auto-pagination in get_all() and to_dataframe(): Previously capped at one page of results. Now auto-paginates using X-Has-Next response header to fetch all available data.
  • New per_page parameter: Both get_all() and to_dataframe() accept per_page (default 100) to control page size.

Upgrade

pip install --upgrade oilpriceapi

v1.0.0 - Production Release

29 Sep 20:52

Choose a tag to compare

OilPriceAPI Python SDK v1.0.0

First stable release of the official OilPriceAPI Python SDK.

Features

  • ✅ Synchronous and asynchronous clients
  • ✅ Comprehensive error handling with automatic retry logic
  • ✅ Type-safe models with Pydantic v2
  • ✅ Current and historical price data access
  • ✅ Optional pandas DataFrame support
  • ✅ Production logging and observability
  • ✅ 100 passing tests with 64% coverage
  • ✅ Full documentation and examples

Installation

pip install oilpriceapi

Quick Start

from oilpriceapi import OilPriceAPI

# Initialize client
client = OilPriceAPI(api_key='your-api-key')

# Get current price
price = client.prices.get('BRENT_CRUDE_USD')
print(f'{price.commodity}: ${price.value}')

Documentation


🤖 Generated with Claude Code