pyowm.tiles package

Submodules

pyowm.tiles.enums module

class pyowm.tiles.enums.MapLayerEnum[source]

Bases: object

Allowed map layer values for tiles retrieval

PRECIPITATION = 'precipitation_new'
PRESSURE = 'pressure_new'
TEMPERATURE = 'temp_new'
WIND = 'wind_new'

pyowm.tiles.tile_manager module

class pyowm.tiles.tile_manager.TileManager(API_key, map_layer, config)[source]

Bases: object

A manager objects that reads OWM map layers tile images .

Parameters:
  • API_key (str) – the OWM Weather API key

  • map_layer (str) – the layer for which you want tiles fetched. Allowed map layers are specified by the pyowm.tiles.enum.MapLayerEnum enumerator class.

  • config (dict) – the configuration dictionary

Returns:

a TileManager instance

Raises:

AssertionError when no API Key or no map layer is provided, or map layer name is not a string

get_tile(x, y, zoom)[source]

Retrieves the tile having the specified coordinates and zoom level

Parameters:
  • x (int) – horizontal tile number in OWM tile reference system

  • y (int) – vertical tile number in OWM tile reference system

  • zoom (int) – zoom level for the tile

Returns:

a pyowm.tiles.Tile instance

Module contents