Skip to main content

PetrolPrices Python

Latest Version on PyPi Software License Build Status Buy us a tree

An SDK to easily work with the PetrolPrices API

Install

Via Pip

pip install petrolprices-sdk

Usage

from petrolprices import PetrolPrices, FuelType, SortMethod

petrolprices = PetrolPrices(api_token="your-token")

nearby = petrolprices.search(
    latitude=123,
    longitude=456,
    fuel_type=FuelType.Unleaded,
    sort_method=SortMethod.Cheapest
)
Available Methods Description
petrolprices.search(...) Retrieve a SearchEntriesCollection dict with details about nearby fuel stations.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

hatch shell

hatch run test

Security

If you discover any security related issues, please email security@voke.dev instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Treeware

You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees here.

Read more about Treeware at treeware.earth.

Metadata

Release files for petrolprices-sdk 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for petrolprices-sdk 0.2.2
File Size Uploaded
petrolprices_sdk-0.2.2.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for petrolprices-sdk 0.2.2
File Interpreter ABI Platform
petrolprices_sdk-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / petrolprices_sdk-0.2.2.tar.gz

Download URL petrolprices_sdk-0.2.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9a185924509f616cba0e3ef0c742ab6a18bc5d72a0fad84543ec24d8c328ec62
BLAKE2b-256 checksum
How to use checksums
4d9ef0a4804646a8c609d79ce2d6146008eaff02bb0783148ed4b83bd0cc388f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.1

Release files / petrolprices_sdk-0.2.2-py3-none-any.whl

Download URL petrolprices_sdk-0.2.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdf31f0e7fa425708bba87bf4a3cc73c088699c07da3ce282ef89e99f1e41ef0
BLAKE2b-256 checksum
How to use checksums
174570a1ae98b13ab4a2da8082f8bf1e2c98025951eb77ca87bc9471546e8027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.1

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page