Help on module pymetar:

NAME
    pymetar

FILE
    /home/klausman/src/pymetar-old/pymetar.py

DESCRIPTION
    PyMETAR is a python module and command line tool designed to fetch Metar
    reports from the NOAA (http://www.noaa.gov) and allow access to the
    included weather information.

CLASSES
    exceptions.Exception(exceptions.BaseException)
        EmptyIDException
        EmptyReportException
        NetworkException
    ReportFetcher
    ReportParser
    WeatherReport
    
    class EmptyIDException(exceptions.Exception)
     |  This gets thrown when the ReportFetcher is called with an empty ID
     |  
     |  Method resolution order:
     |      EmptyIDException
     |      exceptions.Exception
     |      exceptions.BaseException
     |      __builtin__.object
     |  
     |  Data descriptors defined here:
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from exceptions.Exception:
     |  
     |  __init__(...)
     |      x.__init__(...) initializes x; see help(type(x)) for signature
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from exceptions.Exception:
     |  
     |  __new__ = <built-in method __new__ of type object>
     |      T.__new__(S, ...) -> a new object with type S, a subtype of T
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from exceptions.BaseException:
     |  
     |  __delattr__(...)
     |      x.__delattr__('name') <==> del x.name
     |  
     |  __getattribute__(...)
     |      x.__getattribute__('name') <==> x.name
     |  
     |  __getitem__(...)
     |      x.__getitem__(y) <==> x[y]
     |  
     |  __getslice__(...)
     |      x.__getslice__(i, j) <==> x[i:j]
     |      
     |      Use of negative indices is not supported.
     |  
     |  __reduce__(...)
     |  
     |  __repr__(...)
     |      x.__repr__() <==> repr(x)
     |  
     |  __setattr__(...)
     |      x.__setattr__('name', value) <==> x.name = value
     |  
     |  __setstate__(...)
     |  
     |  __str__(...)
     |      x.__str__() <==> str(x)
     |  
     |  __unicode__(...)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from exceptions.BaseException:
     |  
     |  __dict__
     |  
     |  args
     |  
     |  message
    
    class EmptyReportException(exceptions.Exception)
     |  This gets thrown when the ReportParser gets fed an empty report
     |  
     |  Method resolution order:
     |      EmptyReportException
     |      exceptions.Exception
     |      exceptions.BaseException
     |      __builtin__.object
     |  
     |  Data descriptors defined here:
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from exceptions.Exception:
     |  
     |  __init__(...)
     |      x.__init__(...) initializes x; see help(type(x)) for signature
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from exceptions.Exception:
     |  
     |  __new__ = <built-in method __new__ of type object>
     |      T.__new__(S, ...) -> a new object with type S, a subtype of T
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from exceptions.BaseException:
     |  
     |  __delattr__(...)
     |      x.__delattr__('name') <==> del x.name
     |  
     |  __getattribute__(...)
     |      x.__getattribute__('name') <==> x.name
     |  
     |  __getitem__(...)
     |      x.__getitem__(y) <==> x[y]
     |  
     |  __getslice__(...)
     |      x.__getslice__(i, j) <==> x[i:j]
     |      
     |      Use of negative indices is not supported.
     |  
     |  __reduce__(...)
     |  
     |  __repr__(...)
     |      x.__repr__() <==> repr(x)
     |  
     |  __setattr__(...)
     |      x.__setattr__('name', value) <==> x.name = value
     |  
     |  __setstate__(...)
     |  
     |  __str__(...)
     |      x.__str__() <==> str(x)
     |  
     |  __unicode__(...)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from exceptions.BaseException:
     |  
     |  __dict__
     |  
     |  args
     |  
     |  message
    
    class NetworkException(exceptions.Exception)
     |  This gets thrown when a network error occurs
     |  
     |  Method resolution order:
     |      NetworkException
     |      exceptions.Exception
     |      exceptions.BaseException
     |      __builtin__.object
     |  
     |  Data descriptors defined here:
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from exceptions.Exception:
     |  
     |  __init__(...)
     |      x.__init__(...) initializes x; see help(type(x)) for signature
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from exceptions.Exception:
     |  
     |  __new__ = <built-in method __new__ of type object>
     |      T.__new__(S, ...) -> a new object with type S, a subtype of T
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from exceptions.BaseException:
     |  
     |  __delattr__(...)
     |      x.__delattr__('name') <==> del x.name
     |  
     |  __getattribute__(...)
     |      x.__getattribute__('name') <==> x.name
     |  
     |  __getitem__(...)
     |      x.__getitem__(y) <==> x[y]
     |  
     |  __getslice__(...)
     |      x.__getslice__(i, j) <==> x[i:j]
     |      
     |      Use of negative indices is not supported.
     |  
     |  __reduce__(...)
     |  
     |  __repr__(...)
     |      x.__repr__() <==> repr(x)
     |  
     |  __setattr__(...)
     |      x.__setattr__('name', value) <==> x.name = value
     |  
     |  __setstate__(...)
     |  
     |  __str__(...)
     |      x.__str__() <==> str(x)
     |  
     |  __unicode__(...)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from exceptions.BaseException:
     |  
     |  __dict__
     |  
     |  args
     |  
     |  message
    
    class ReportFetcher
     |  Fetches a report from a given METAR id, optionally taking into
     |  account a different baseurl and using environment var-specified
     |  proxies.
     |  
     |  Methods defined here:
     |  
     |  FetchReport(self, StationCode=None, proxy=None)
     |      Fetch a report for a given station ID from the baseurl given
     |      upon creation of the ReportFetcher instance.
     |      If proxy is not None, a proxy URL of the form
     |      protocol://user:password@host.name.tld:port/
     |      is expected, for example:
     |      http://squid.somenet.com:3128/
     |      If no proxy is specified, the environment variable http_proxy
     |      is inspected. If it isn't set, a direct connection is tried.
     |  
     |  GetReport(self)
     |      Get a previously fetched report again
     |  
     |  MakeReport(self, StationID, RawReport)
     |      Take a string (RawReport) and a station code and turn it
     |      into an object suitable for ReportParser
     |  
     |  __init__(self, MetarStationCode=None, baseurl='http://weather.noaa.gov/pub/data/observations/metar/decoded/')
     |      Set stationid attribute and base URL to fetch report from
    
    class ReportParser
     |  Parse raw METAR data from a WeatherReport object into actual
     |  values and return the object with the values filled in.
     |  
     |  Methods defined here:
     |  
     |  ParseReport(self, MetarReport=None)
     |      Take report with raw info only and return it with in
     |      parsed values filled in. Note: This function edits the
     |      WeatherReport object you supply!
     |  
     |  __init__(self, MetarReport=None)
     |      Set attribute Report as specified on instantation.
     |  
     |  extractCloudInformation(self)
     |      Extract cloud information. Return None or a tuple (sky type as a
     |      string of text, cloud type (if any)  and suggested pixmap name)
     |  
     |  extractSkyConditions(self)
     |      Extract sky condition information from the encoded report. Return
     |      a tuple containing the description of the sky conditions as a
     |      string and a suggested pixmap name for an icon representing said
     |      sky condition.
     |  
     |  match_WeatherPart(self, regexp)
     |      Return the matching part of the encoded Metar report.
     |      regexp: the regexp needed to extract this part.
     |      Return the first matching string or None.
     |      WARNING: Some Metar reports may contain several matching
     |      strings, only the first one is taken into account!
    
    class WeatherReport
     |  Incorporates both the unparsed textual representation of the
     |  weather report and the parsed values as soon as they are filled
     |  in by ReportParser.
     |  
     |  Methods defined here:
     |  
     |  __init__(self, MetarStationCode=None)
     |      Clear all fields and fill in wanted station id.
     |  
     |  getCloudinfo(self)
     |      Return a tuple consisting of the parsed cloud information and a
     |      suggest pixmap name
     |  
     |  getCloudtype(self)
     |      Return cloud type information
     |  
     |  getConditions(self)
     |      Return a tuple consisting of the parsed sky conditions and a
     |      suggested pixmap name
     |  
     |  getCycle(self)
     |      Return cycle value.
     |      The cycle value is not the frequency or delay between
     |      observations but the "time slot" in which the observation was made.
     |      There are 24 cycle slots every day which usually last from N:45 to
     |      N+1:45. The cycle from 23:45 to 0:45 is cycle 0.
     |  
     |  getDewPointCelsius(self)
     |      Return dewpoint in degrees Celsius.
     |  
     |  getDewPointFahrenheit(self)
     |      Return dewpoint in degrees Fahrenheit.
     |  
     |  getFullReport(self)
     |      Return the complete weather report.
     |  
     |  getHumidity(self)
     |      Return relative humidity in percent.
     |  
     |  getISOTime(self)
     |      Return the time when the observation was made in ISO 8601 format
     |      (e.g. 2002-07-25 15:12:00Z)
     |  
     |  getPixmap(self)
     |      Return a suggested pixmap name, without extension, depending on
     |      current weather.
     |  
     |  getPressure(self)
     |      Return pressure in hPa.
     |  
     |  getPressuremmHg(self)
     |      Return pressure in mmHg.
     |  
     |  getRawMetarCode(self)
     |      Return the encoded weather report.
     |  
     |  getReportURL(self)
     |      Return the URL from which the report was fetched.
     |  
     |  getSkyConditions(self)
     |      Return sky conditions
     |  
     |  getStationAltitude(self)
     |      Return the station's altitude above the sea in meters.
     |  
     |  getStationCity(self)
     |      Return city-part of station name
     |  
     |  getStationCountry(self)
     |      Return country-part of station name
     |  
     |  getStationLatitude(self)
     |      Return the station's latitude in dd-mm[-ss]D format :
     |      dd : degrees
     |      mm : minutes
     |      ss : seconds
     |      D : direction (N, S, E, W)
     |  
     |  getStationLatitudeFloat(self)
     |      Return latitude as a float
     |  
     |  getStationLongitude(self)
     |      Return the station's longitude in dd-mm[-ss]D format :
     |      dd : degrees
     |      mm : minutes
     |      ss : seconds
     |      D : direction (N, S, E, W)
     |  
     |  getStationLongitudeFloat(self)
     |      Return Longitude as a float
     |  
     |  getStationName(self)
     |      Return full station name
     |  
     |  getStationPosition(self)
     |      Return latitude, longitude and altitude above sea level of station
     |      as a tuple. Some stations don't deliver altitude, for those, None
     |      is returned as altitude.  The lat/longs are expressed as follows:
     |      xx-yyd
     |      where xx is degrees, yy minutes and d the direction.
     |      Thus 51-14N means 51 degrees, 14 minutes north.  d may take the
     |      values N, S for latitues and W, E for longitudes. Latitude and
     |      Longitude may include seconds.  Altitude is always given as meters
     |      above sea level, including a trailing M.
     |      Schipohl Int. Airport Amsterdam has, for example:
     |      ('52-18N', '004-46E', '-2M')
     |      Moenchengladbach (where I live):
     |      ('51-14N', '063-03E', None)
     |      If you need lat and long as float values, look at
     |      getStationPositionFloat() instead
     |  
     |  getStationPositionFloat(self)
     |      Return latitude and longitude as float values in a
     |      tuple (lat, long, alt).
     |  
     |  getTemperatureCelsius(self)
     |      Return the temperature in degrees Celsius.
     |  
     |  getTemperatureFahrenheit(self)
     |      Return the temperature in degrees Fahrenheit.
     |  
     |  getTime(self)
     |      Return the time when the observation was made.  Note that this
     |      is *not* the time when the report was fetched by us
     |      Format:  YYYY.MM.DD HHMM UTC
     |      Example: 2002.04.01 1020 UTC
     |  
     |  getVisibilityKilometers(self)
     |      Return visibility in km.
     |  
     |  getVisibilityMiles(self)
     |      Return visibility in miles.
     |  
     |  getWeather(self)
     |      Return short weather conditions
     |  
     |  getWindCompass(self)
     |      Return wind direction as compass direction
     |      (e.g. NE or SSE)
     |  
     |  getWindDirection(self)
     |      Return wind direction in degrees.
     |  
     |  getWindSpeed(self)
     |      Return the wind speed in meters per second.
     |  
     |  getWindSpeedBeaufort(self)
     |      Return the wind speed in the Beaufort scale
     |      cf. http://en.wikipedia.org/wiki/Beaufort_scale
     |  
     |  getWindSpeedKnots(self)
     |      Return the wind speed in knots
     |  
     |  getWindSpeedMilesPerHour(self)
     |      Return the wind speed in miles per hour.
     |  
     |  getWindchill(self)
     |      Return wind chill in degrees Celsius
     |  
     |  getWindchillF(self)
     |      Return wind chill in degrees Fahrenheit

FUNCTIONS
    metar_to_iso8601(metardate)
        Convert a metar date to an ISO8601 date.

DATA
    CLOUDTYPES = {'ACC': 'altocumulus castellanus', 'ACSL': 'standing lent...
    CLOUD_RE_STR = '^(CAVOK|CLR|SKC|BKN|SCT|FEW|OVC|NSC)([0-9]{3})?(TCU|CU...
    COND_RE_STR = r'^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|...S|U...
    __author__ = 'klausman-pymetar@schwarzvogel.de'
    __revision__ = ''
    __version__ = '0.19'

VERSION
    0.19

AUTHOR
    klausman-pymetar@schwarzvogel.de


