pyowm.weatherapi25.parsers package

Submodules

pyowm.weatherapi25.parsers.forecastparser module

pyowm.weatherapi25.parsers.observationlistparser module

pyowm.weatherapi25.parsers.observationparser module

pyowm.weatherapi25.parsers.stationhistoryparser module

Module containing a concrete implementation for JSONParser abstract class, returning a StationHistory instance

class pyowm.weatherapi25.parsers.stationhistoryparser.StationHistoryParser[source]

Bases: pyowm.abstractions.jsonparser.JSONParser

Concrete JSONParser implementation building a StationHistory instance out of raw JSON data coming from OWM Weather API responses.

parse_JSON(JSON_string)[source]

Parses a StationHistory instance out of raw JSON data. Only certain properties of the data are used: if these properties are not found or cannot be parsed, an error is issued.

Parameters:JSON_string (str) – a raw JSON string
Returns:a StationHistory instance or None if no data is available
Raises:ParseResponseError if it is impossible to find or parse the data needed to build the result, APIResponseError if the JSON string embeds an HTTP status error

pyowm.weatherapi25.parsers.stationlistparser module

Module containing a concrete implementation for JSONParser abstract class, returning a list of Station instances

class pyowm.weatherapi25.parsers.stationlistparser.StationListParser[source]

Bases: pyowm.abstractions.jsonparser.JSONParser

Concrete JSONParser implementation building a list of Station instances out of raw JSON data coming from OWM Weather API responses.

parse_JSON(JSON_string)[source]

Parses a list of Station instances out of raw JSON data. Only certain properties of the data are used: if these properties are not found or cannot be parsed, an error is issued.

Parameters:JSON_string (str) – a raw JSON string
Returns:a list of Station instances or None if no data is available
Raises:ParseResponseError if it is impossible to find or parse the data needed to build the result, APIResponseError if the OWM API returns a HTTP status error

pyowm.weatherapi25.parsers.stationparser module

Module containing a concrete implementation for JSONParser abstract class, returning a Station instance

class pyowm.weatherapi25.parsers.stationparser.StationParser[source]

Bases: pyowm.abstractions.jsonparser.JSONParser

Concrete JSONParser implementation building a Station instance out of raw JSON data coming from OWM Weather API responses.

parse_JSON(JSON_string)[source]

Parses a Station instance out of raw JSON data. Only certain properties of the data are used: if these properties are not found or cannot be parsed, an error is issued.

Parameters:JSON_string (str) – a raw JSON string
Returns:a Station instance or None if no data is available
Raises:ParseResponseError if it is impossible to find or parse the data needed to build the result, APIResponseError if the JSON string embeds an HTTP status error

pyowm.weatherapi25.parsers.weatherhistoryparser module

Module containing a concrete implementation for JSONParser abstract class, returning a list of Weather objects

class pyowm.weatherapi25.parsers.weatherhistoryparser.WeatherHistoryParser[source]

Bases: pyowm.abstractions.jsonparser.JSONParser

Concrete JSONParser implementation building a list of Weather instances out of raw JSON data coming from OWM Weather API responses.

parse_JSON(JSON_string)[source]

Parses a list of Weather instances out of raw JSON data. Only certain properties of the data are used: if these properties are not found or cannot be parsed, an error is issued.

Parameters:JSON_string (str) – a raw JSON string
Returns:a list of Weather instances or None if no data is available
Raises:ParseResponseError if it is impossible to find or parse the data needed to build the result, APIResponseError if the JSON string embeds an HTTP status error

Module contents