peyk.platforms.bale.types.location

Classes

Location(longitude, latitude)

Represent the Bale Bot API Location object.

class peyk.platforms.bale.types.location.Location(longitude: float, latitude: float)[source]

Bases: object

Represent the Bale Bot API Location object.

Preserves the existing dataclass fields and parsing behavior.

longitude: float
latitude: float
classmethod from_dict(data: dict | None) Location | None[source]

Parse raw Bale data into Location.

Parameters:

data (Optional[dict]) – Raw API object or None.

Returns:

Parsed object or None.

Return type:

Optional[Location]

Raises:

KeyError – If a required raw field is missing.