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.3.tar.gz (20.5 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.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uk_fuel_prices_api-0.0.3.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for uk_fuel_prices_api-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3d961ccdad77bc0c1812a8f559adf6e60342399aaebe5d61e88fb5cc0be57766
MD5 f49f02b9ce934f1cd3e336857b031730
BLAKE2b-256 8ebb5570e38795afd278411c642e963f86649ca2e9cc1091e862ca9f288051c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uk_fuel_prices_api-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 04d7e8b03163c13afe4b38a798cde5854c43b4614ae2ab5fc4981a5ce5887981
MD5 1dec4f61b9bfeed6d40e988823f229ca
BLAKE2b-256 77b85ebd1fa0aa4d28d346b734aa818d9c74552a9878996662a8dc53c4c9fb55

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