mimitfuelpy

A Python library for accessing the Mimit Fuel Prices API

Get started now View on GitHub


Overview

mimitfuelpy provides a clean, object-oriented interface for searching fuel stations and retrieving fuel pricing data in Italy. The library wraps the Mimit Fuel Prices API, making it easy to integrate fuel data into your Python applications.

Key Features

  • πŸš— Station Search: Find fuel stations by location, brand, highway, or zone
  • πŸ’° Price Data: Get current fuel prices with filtering options
  • πŸ—ΊοΈ Geographic Data: Access regions, provinces, towns, and highways
  • πŸ“Š Flexible Filtering: Filter by fuel type and service type
  • 🏒 Service Areas: Detailed service area information with facilities
  • πŸ” Easy Integration: Simple, intuitive API design

Getting Started

Installation

Install mimitfuelpy using pip:

pip install mimitfuelpy

Quick Example

from mimitfuelpy import Client
from mimitfuelpy.models import FuelType, ServiceType, SearchByBrandCriteria

# Initialize the client
client = Client()

# Search for fuel stations
criteria = SearchByBrandCriteria(
    province="MI",  # Milan
    priceOrder="asc",
    fuelType=FuelType.PETROL.value,
    serviceType=ServiceType.SELF.value
)

results = client.search.byBrand(criteria)
for station in results.results:
    print(f"{station.name}: {station.address}")
    if station.fuels:
        for fuel in station.fuels:
            print(f"  - {fuel.name}: €{fuel.price}")

What’s Next?


Support