PyMetOffice  0.4
Pythonic access to UK Met Office DataPoint API
Public Member Functions | Public Attributes | List of all members
pymetoffice.base.Site Class Reference

The Site class simply provides a convenient container for site information. More...

Inheritance diagram for pymetoffice.base.Site:

Public Member Functions

def __init__
 The parameters are derived straight from JSON or XML values.
 
def __lt__
 This is provided so that Site objects are sortable by name.
 
def __repr__
 This provides a simple printable representation.
 
def __str__
 

Public Attributes

 name
 
 id
 
 latitude
 
 longitude
 

Detailed Description

The Site class simply provides a convenient container for site information.

It can be used as a sortable item in lists.

Definition at line 331 of file base.py.

Constructor & Destructor Documentation

def pymetoffice.base.Site.__init__ (   self,
  name,
  id,
  latitude,
  longitude 
)

The parameters are derived straight from JSON or XML values.

Typically, one creates a Site object by site = Site(**<data-from-DataPoint>) as in the _getObervationSitelist code.

Definition at line 336 of file base.py.

Member Function Documentation

def pymetoffice.base.Site.__lt__ (   self,
  other 
)

This is provided so that Site objects are sortable by name.

Definition at line 343 of file base.py.

def pymetoffice.base.Site.__repr__ (   self)

This provides a simple printable representation.

Mostly useful for testing.

Definition at line 347 of file base.py.


The documentation for this class was generated from the following file: