astropy:docs

VOSDatabase

class astropy.vo.client.vos_catalog.VOSDatabase(tree)[source] [edit on github]

Bases: astropy.vo.client.vos_catalog.VOSCatalog

A class to represent a collection of VOSCatalog.

Parameters :

tree : JSON tree

Raises :

VOSError :

If given tree does not have ‘catalogs’ key.

Methods Summary

get_catalog(name) Get one catalog of given name.
get_catalog_by_url(url) Like get_catalog() but using access URL look-up.
get_catalogs() Iterator to get all catalogs.
get_catalogs_by_url(url) Like get_catalogs() but using access URL look-up.
list_catalogs([pattern, sort]) List catalog names.

Methods Documentation

get_catalog(name)[source] [edit on github]

Get one catalog of given name.

Parameters :

name : str

Primary key identifying the catalog.

Returns :

obj : VOSCatalog object

Raises :

VOSError :

If catalog is not found.

get_catalog_by_url(url)[source] [edit on github]

Like get_catalog() but using access URL look-up. On multiple matches, only first match is returned.

get_catalogs()[source] [edit on github]

Iterator to get all catalogs.

get_catalogs_by_url(url)[source] [edit on github]

Like get_catalogs() but using access URL look-up.

list_catalogs(pattern=None, sort=True)[source] [edit on github]

List catalog names.

Parameters :

pattern : str or None

If given string is anywhere in a catalog name, it is considered a matching catalog. It accepts patterns as in fnmatch and is case-insensitive. By default, all catalogs are returned.

sort : bool

Sort output in alphabetical order. If not sorted, the order depends on dictionary hashing. Default is True.

Returns :

out_arr : list of str

List of catalog names.

Page Contents