TablesFile

class pyvo.io.vosi.endpoint.TablesFile(config=None, pos=None, version='1.1')[source]

Bases: pyvo.utils.xml.elements.Element

TABLESET/TABLE element: represents an entire file. The keyword arguments correspond to setting members of the same name, documented below.

Attributes Summary

ntables The number of tables in the file.
table(fget)
tableset(fget)
version(fget)

Methods Summary

get_first_table(self) When you parse table metadata for a single table here is only one table in the file, and that’s all you need.
get_table_by_name(self, name) Looks up a table element by the given name.
iter_tables(self) Iterates over all tables in the VOSITables file in a “flat” way, ignoring the schemas.
parse(self, iterator, config) For internal use.

Attributes Documentation

ntables

The number of tables in the file.

table(fget)
tableset(fget)
version(fget)

Methods Documentation

get_first_table(self)[source]

When you parse table metadata for a single table here is only one table in the file, and that’s all you need. This method returns that first table.

get_table_by_name(self, name)[source]

Looks up a table element by the given name.

iter_tables(self)[source]

Iterates over all tables in the VOSITables file in a “flat” way, ignoring the schemas.

parse(self, iterator, config)[source]

For internal use. Parse the XML content of the children of the element. Override this method and do after-parse checks after calling super().parse, if you need to.

Parameters:
iterator : xml iterator

An iterator over XML elements as returned by get_xml_iterator.

config : dict

The configuration dictionary that affects how certain elements are read.