A VehicleCluster defines a set of vehicles of a specific make and model.

Vehicle clusters are shown in the showroom of the web app.

DetailLevel

Bases: IntEnum

The level of detail to include in a VehicleCluster object.

More detail means more requests. Used in the API Client to determine what to load.

Attributes:
  • CLUSTER_ONLY

    Only include the cluster details, do not load the vehicles. Requires one request.

  • INCLUDE_VEHICLES

    Also load the vehicles of the cluster. Requires one request per cluster.

  • INCLUDE_VEHICLE_DETAILS

    Include extra details of the vehicles. Requires one request per vehicle.

CLUSTER_ONLY = 0 class-attribute instance-attribute

INCLUDE_VEHICLES = 1 class-attribute instance-attribute

INCLUDE_VEHICLE_DETAILS = 2 class-attribute instance-attribute

VehicleCluster

Bases: BaseModel

Vehicle Cluster model.

A Cluster defines a vehicle make and type. All registered cars belong to the cluster of its make and type.

additionPercentage: float | None = None class-attribute instance-attribute

externalFuelTypeId: int instance-attribute

externalTypeId: str instance-attribute

firstVehicleId: str instance-attribute

fiscalValueInEuro: float instance-attribute

imageUri: str instance-attribute

latestModelYear: int instance-attribute

make: str instance-attribute

maxCO2Emission: int instance-attribute

minPriceInEuroPerMonth: float instance-attribute

model: str instance-attribute

vehicleCount: int instance-attribute

vehicles: list[Vehicle] | None = Field(init=False, optional=True, default=None) class-attribute instance-attribute

__str__()

Return the string representation of the vehicle cluster.

Shows the make and model, and all vehicles in the cluster (if loaded).

VehicleClusters

Bases: BaseModel

Collection of vehicle clusters.

vehicle_clusters: list[VehicleCluster] instance-attribute

__getitem__(index)

Get the vehicle cluster at the given index.

__iter__()

Iterate over the vehicle clusters.

__str__()

Return the string representation of the vehicle clusters.

Show one cluster per line.