lories.location#

Exceptions#

LocationException

Raise if an error occurred accessing the location.

LocationUnavailableException

Raise if a configured location access can not be found.

Classes#

Location

Location objects are convenient containers for latitude, longitude,

Module Contents#

exception lories.location.LocationException[source]#

Bases: lories.core.ResourceError

Inheritance diagram of lories.location.LocationException

Raise if an error occurred accessing the location.

Initialize self. See help(type(self)) for accurate signature.

exception lories.location.LocationUnavailableException[source]#

Bases: lories.core.ResourceUnavailableError, LocationException

Inheritance diagram of lories.location.LocationUnavailableException

Raise if a configured location access can not be found.

Initialize self. See help(type(self)) for accurate signature.

class lories.location.Location(latitude: float, longitude: float, timezone: str | pytz.BaseTzInfo = tz.UTC, altitude: float | None = None, country: str | None = None, state: str | None = None)[source]#

Location objects are convenient containers for latitude, longitude, timezone, and altitude data associated with a particular geographic location.

Parameters:
  • latitude (float.) – Positive is north of the equator. Use decimal degrees notation.

  • longitude (float.) – Positive is east of the prime meridian. Use decimal degrees notation.

  • timezone (str or pytz.timezone, default is 'UTC'.) – See http://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of valid time zones.

  • altitude (float, default 0.) – Altitude from sea level in meters.