gavo.protocols.vocabularies module¶
A shallow interface to IVOA vocabularies.
- class gavo.protocols.vocabularies.SubjectMeta(content='', format='plain')[source]¶
Bases:
MetaValue
A MetaValue translating UAT terms to their labels in HTML.
This follows the assumption that HTML is what humans look at, anything else is either computers or nerds.
- gavo.protocols.vocabularies.download_file(url, cache, show_progress, http_headers)[source]¶
a partial implementation of astropy.utils.data.download_file to be used until we can rely on astropy 4.
We actually ignore cache and show_progress…
- gavo.protocols.vocabularies.get_label(voc, term)[source]¶
returns the label of term if it’s in the desise vocabulary voc, term capitalised otherwise.
- gavo.protocols.vocabularies.get_vocabulary(voc_name, force_update=False)[source]¶
returns an IVOA vocabulary in its “desise” form.
See Vocabularies in the VO 2 to see what is inside of this.
This will use a cache to avoid repeated updates, but it will attempt to re-download if the cached copy is older than 6 months.