aioprecioscarburantes
Async Python client for Spanish fuel prices, from the Spanish Ministry's
official PreciosCarburantes REST service (the data behind Geoportal Gasolineras).
No API key needed. Prices are updated every 30 minutes.
import asyncio
from aioprecioscarburantes import FuelType, PreciosCarburantes
async def main() -> None:
async with PreciosCarburantes() as client:
result = await client.get_stations_by_municipality("6139")
for station in result.stations:
print(station.brand, station.prices.get(FuelType.DIESEL_A))
asyncio.run(main())
Methods: get_provinces(), get_municipalities(province_id),
get_stations_by_municipality(municipality_id),
get_stations_by_province(province_id), get_station(municipality_id, station_id).
Pass an existing aiohttp.ClientSession to share it.
Stations with restricted sales
The official service leaves out stations that only sell to members or fleets
(e.g. agricultural cooperatives). get_station_by_id(station_id) reads any
station, restricted ones included, from the API behind the
Geoportal Gasolineras website. That API is
undocumented and may change without notice; the station it returns has no
municipality or province ids.
Opening hours
parse_schedule(station.schedule) understands the Ministry's opening hours
("L-D: 24H", "L-S: 07:00-22:00; D: 08:00-14:00", "L-V: 07:00-14:00 y 16:00-21:00"…)
and returns a Schedule with is_open(datetime); next_change(schedule, datetime)
gives the next opening or closing. Unknown or ambiguous formats return None.
Metadata
Release files for aioprecioscarburantes 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aioprecioscarburantes-0.5.0.tar.gz | 11.3 kB | With provenance | Details for aioprecioscarburantes-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioprecioscarburantes-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for aioprecioscarburantes-0.5.0-py3-none-any.whl |
Total release size: 21.2 kB
Release files / aioprecioscarburantes-0.5.0.tar.gz
| Download URL | aioprecioscarburantes-0.5.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c8c58b7d2a519b81e28822eee6e89e66803508170d4c2689a40655b0db398a3
|
|
BLAKE2b-256 checksum How to use checksums |
5337bbe4502ebce8396ed681bf0a7b5d0a22a76fd1f2f44a5c82cd1cb5c3fac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / aioprecioscarburantes-0.5.0-py3-none-any.whl
| Download URL | aioprecioscarburantes-0.5.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2502a658788f85b83990c63008bfbe94a65f4e7803460c3879ee9b24480b756d
|
|
BLAKE2b-256 checksum How to use checksums |
97867e80c8da38759b817c57bfcc679dac5fc187d5734a36190282559dba05ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for aioprecioscarburantes 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aioprecioscarburantes-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.