h5rdmtoolbox.convention.standard_names.table.StandardNameTable.from_web#

static StandardNameTable.from_web(url, known_hash=None, name=None, **meta)[source]#

Create a StandardNameTable from an online resource. Provide a hash is recommended.

Parameters
  • url (str) – URL of the file to download.

    Note

    You may read a table stored as a yaml file from a github repository by using the following url: https://raw.githubusercontent.com/<username>/<repository>/<branch>/<filepath>

  • known_hash (str, optional) – Hash of the file, by default None

  • name (str, optional) – Name of the StandardNameTable, by default None. If None, the name of the xml file is used.

Returns

snt (StandardNameTable) – The StandardNameTable object

Examples

>>> cf = StandardNameTable.from_web("https://cfconventions.org/Data/cf-standard-names/79/src/cf-standard-name-table.xml",
>>>                                known_hash="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"