Skip to main content

Python API to access latest fuel prices in the UK

Project description

UK Fuel Prices

Pull UK Fuel Price data from sources listed here. Please note the data is not complete, and does not include pricing for every fuel station in the UK. More information is available at the link.

Installation

The package is available to install with pip

pip install uk-fuel-prices-api

Example

Initialise

Import the package, and retrieve price information. get_prices() should be called whenever you want to update the pricing data. Please bear in mind that at this time, most companies are only updating their data feeds every 24 hours.

from uk_fuel_prices_api import UKFuelPricesApi
api = UKFuelPricesApi();

await api.get_prices()

Search

Search for all stations matching value

await api.search("searchstring")

# Only return first 5 results
await api.search("searchstring", 5)

Site ID

Get single Station by known site_id

await api.get_site_id("siteid")

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

uk_fuel_prices_api-0.0.2.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uk_fuel_prices_api-0.0.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file uk_fuel_prices_api-0.0.2.tar.gz.

File metadata

  • Download URL: uk_fuel_prices_api-0.0.2.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for uk_fuel_prices_api-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b243dfcde75c92598c134247c0a2a93040844f3dfd2415cdea7b1ea9f8032ebe
MD5 6f33c8e59ec19bcda2065f2026d4180d
BLAKE2b-256 b633bdbbba096374402d802d4ab26741bac2bdc775ad2c53fef5ef0cddd9dedc

See more details on using hashes here.

File details

Details for the file uk_fuel_prices_api-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for uk_fuel_prices_api-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f094cc63d6088187f4dcebd98484d992365f10086e163b1a73c9237def950202
MD5 a4d14481626ea94ced730ad729ae7036
BLAKE2b-256 7281fc8cf7695ccd4b58355685d4d83f97218c4b369d5b6144daab8fbb262765

See more details on using hashes here.

Supported by

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