2018-08-06 20:03 UTC

NIST

NAME
    NIST

PACKAGE CONTENTS
    DB
    Isotopes
    PhysicalConstants

NIST.DB

NAME
    NIST.DB

CLASSES
    builtins.object
        Table
    
    class Table(builtins.object)
     |  Table(database=None, database_parameters={})
     |  
     |  Base class for creating database tables from remote data.
     |  
     |  Subclasses must override TABLE, FIELDS, and db_retrieve.
     |  
     |  Methods defined here:
     |  
     |  __getitem__(self, key)
     |  
     |  __init__(self, database=None, database_parameters={})
     |      Initialize the object.
     |      
     |      database: The database to pass to the sqlite3.connect, or an existing
     |      connection.
     |      
     |      database_parameters: Additional parameters to pass to sqlite3.connect.
     |      
     |      The database table will be checked during initialization and rebuilt if
     |      necessary.
     |  
     |  __iter__(self)
     |  
     |  db_create_views(self)
     |      Create temporary views in the database.
     |  
     |  db_is_consistent(self)
     |      Check if the database table is consistent, i.e. that it exists and
     |      contains the expected columns.
     |      
     |      The data itself is not checked.
     |      
     |      Returns True or False. The database is not modified.
     |  
     |  db_rebuild(self)
     |      Rebuild the database table.
     |  
     |  db_retrieve(self)
     |      Retrieve the data and return the values to insert into the table.
     |      
     |      The result should be an iterator that produces tuples of the expected size.
     |      
     |      This method must be overridden in subclasses for each table.
     |  
     |  search(self, terms, union=True)
     |      Search first field in table.
     |      
     |      See search_by_field for more help.
     |  
     |  search_by_field(self, field, terms, union=True)
     |      Search the table for records in the given field "LIKE" the search terms.
     |      
     |      union: if True then the union of all matches is returned, otherwise the
     |      intersection.
     |      
     |      Use "%" as a wildcard, e.g. "search('%foo%')".
     |  
     |  to_json_str(self, *args, **kwargs)
     |      Get a JSON representation of the table.
     |      
     |      All arguments are passed to json.dumps
     |  
     |  to_xml_str(self, *args, **kwargs)
     |      Get an XML representation of the table.
     |      
     |      All arguments are passed to xml.dom.minidom.Document.toprettyxml
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  FIELDS = ()
     |  
     |  TABLE = ''
     |  
     |  VIEWS = {}

FUNCTIONS
    make_parent_dirs(path, mode=511, exist_ok=True)
        Recursively create all parent directories of the given path.

NIST.Isotopes

None
 |  NIST.Isotopes(database=None, database_parameters={})
 |  
 |  Work with NIST isotope data.
 |  
 |  The data will be retrieved from NIST's server and cached in a local SQLite3
 |  database.
 |  
 |  Method resolution order:
 |      Isotopes
 |      NIST.DB.Table
 |      builtins.object
 |  
 |  Methods defined here:
 |  
 |  db_retrieve(self)
 |      Retrieve isotope data.
 |  
 |  dict_atomic_number_to_symbol(self)
 |      Return a dictionary of atomic numbers to symbols.
 |  
 |  dict_atomic_number_to_weight(self)
 |      Return a dictionary of atomic numbers to standard weights.
 |      
 |      Weights are returned as UncertainDecimals.
 |  
 |  dict_symbol_to_atomic_number(self)
 |      Return a dictionary of atomic numbers to symbols.
 |  
 |  dict_symbol_to_weight(self)
 |      Return a dictionary of symbols to standard weights.
 |      
 |      Weights are returned as UncertainDecimals.
 |  
 |  get_standard_weights(self, symbols=None)
 |      Return an iterator over tuples of atomic symbols and standard atomic
 |      weights.
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  FIELDS = (('Atomic Number', 'INTEGER'), ('Atomic Symbol', 'TEXT'), ('M...
 |  
 |  SCIENTIFIC_NUMBER_FIELDS = ('Relative Atomic Mass', 'Isotopic Composit...
 |  
 |  TABLE = 'Isotopes'
 |  
 |  VIEWS = {'Standard Atomic Weights': 'SELECT DISTINCT "Atomic Number", ...
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from NIST.DB.Table:
 |  
 |  __getitem__(self, key)
 |  
 |  __init__(self, database=None, database_parameters={})
 |      Initialize the object.
 |      
 |      database: The database to pass to the sqlite3.connect, or an existing
 |      connection.
 |      
 |      database_parameters: Additional parameters to pass to sqlite3.connect.
 |      
 |      The database table will be checked during initialization and rebuilt if
 |      necessary.
 |  
 |  __iter__(self)
 |  
 |  db_create_views(self)
 |      Create temporary views in the database.
 |  
 |  db_is_consistent(self)
 |      Check if the database table is consistent, i.e. that it exists and
 |      contains the expected columns.
 |      
 |      The data itself is not checked.
 |      
 |      Returns True or False. The database is not modified.
 |  
 |  db_rebuild(self)
 |      Rebuild the database table.
 |  
 |  search(self, terms, union=True)
 |      Search first field in table.
 |      
 |      See search_by_field for more help.
 |  
 |  search_by_field(self, field, terms, union=True)
 |      Search the table for records in the given field "LIKE" the search terms.
 |      
 |      union: if True then the union of all matches is returned, otherwise the
 |      intersection.
 |      
 |      Use "%" as a wildcard, e.g. "search('%foo%')".
 |  
 |  to_json_str(self, *args, **kwargs)
 |      Get a JSON representation of the table.
 |      
 |      All arguments are passed to json.dumps
 |  
 |  to_xml_str(self, *args, **kwargs)
 |      Get an XML representation of the table.
 |      
 |      All arguments are passed to xml.dom.minidom.Document.toprettyxml
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from NIST.DB.Table:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)

NIST.PhysicalConstants

None
 |  NIST.PhysicalConstants(database=None, database_parameters={})
 |  
 |  Work with NIST Physical Constant data.
 |  
 |  The data will be retrieved from NIST's server and cached in a local SQLite3
 |  database.
 |  
 |  Method resolution order:
 |      PhysicalConstants
 |      NIST.DB.Table
 |      builtins.object
 |  
 |  Methods defined here:
 |  
 |  __getitem__(self, key)
 |  
 |  db_retrieve(self)
 |      Retrieve physical constant date from NIST
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  FIELDS = (('Quantity', 'TEXT'), ('Value', 'TEXT'), ('Uncertainty', 'TE...
 |  
 |  TABLE = 'Physical Constants'
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from NIST.DB.Table:
 |  
 |  __init__(self, database=None, database_parameters={})
 |      Initialize the object.
 |      
 |      database: The database to pass to the sqlite3.connect, or an existing
 |      connection.
 |      
 |      database_parameters: Additional parameters to pass to sqlite3.connect.
 |      
 |      The database table will be checked during initialization and rebuilt if
 |      necessary.
 |  
 |  __iter__(self)
 |  
 |  db_create_views(self)
 |      Create temporary views in the database.
 |  
 |  db_is_consistent(self)
 |      Check if the database table is consistent, i.e. that it exists and
 |      contains the expected columns.
 |      
 |      The data itself is not checked.
 |      
 |      Returns True or False. The database is not modified.
 |  
 |  db_rebuild(self)
 |      Rebuild the database table.
 |  
 |  search(self, terms, union=True)
 |      Search first field in table.
 |      
 |      See search_by_field for more help.
 |  
 |  search_by_field(self, field, terms, union=True)
 |      Search the table for records in the given field "LIKE" the search terms.
 |      
 |      union: if True then the union of all matches is returned, otherwise the
 |      intersection.
 |      
 |      Use "%" as a wildcard, e.g. "search('%foo%')".
 |  
 |  to_json_str(self, *args, **kwargs)
 |      Get a JSON representation of the table.
 |      
 |      All arguments are passed to json.dumps
 |  
 |  to_xml_str(self, *args, **kwargs)
 |      Get an XML representation of the table.
 |      
 |      All arguments are passed to xml.dom.minidom.Document.toprettyxml
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from NIST.DB.Table:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from NIST.DB.Table:
 |  
 |  VIEWS = {}
Contact
echo xyne.archlinux.ca | sed 's/\./@/'
Feeds
Blog News
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0