Reference/API# Package#

This package reads and writes data formats used by the Virtual Observatory (VO) initiative, particularly the VOTable XML format.


parse(source[, columns, invalid, verify, ...])

Parses a VOTABLE xml file (or file-like object), and returns a VOTableFile object.

parse_single_table(source, **kwargs)

Parses a VOTABLE xml file (or file-like object), reading and returning only the first TableElement instance.

validate(source[, output, xmllint, filename])

Prints a validation report for the given file.

from_table(table[, table_id])

Given an Table object, return a VOTableFile file structure containing just that single table.


Reads the header of a file to determine if it is a VOTable file.

writeto(table, file[, tabledata_format])

Writes a VOTableFile to a VOTABLE xml file.



Configuration parameters for Module#


Link([ID, title, value, href, action, id, ...])

LINK elements: used to reference external documents and servers through a URI.

Info([ID, name, value, id, xtype, ref, ...])

INFO elements: arbitrary key-value pairs for extensions to the standard.

Values(votable, field[, ID, null, ref, ...])

VALUES element: used within FIELD and PARAM elements to define the domain of values.

Field(votable[, ID, name, datatype, ...])

FIELD element: describes the datatype of a particular column of data.

Param(votable[, ID, name, value, datatype, ...])

PARAM element: constant-valued columns in the data.

CooSys([ID, equinox, epoch, system, id, ...])

COOSYS element: defines a coordinate system.

TimeSys([ID, timeorigin, timescale, ...])

TIMESYS element: defines a time system.

FieldRef(table, ref[, ucd, utype, config, pos])

FIELDref element: used inside of GROUP elements to refer to remote FIELD elements.

ParamRef(table, ref[, ucd, utype, config, pos])

PARAMref element: used inside of GROUP elements to refer to remote PARAM elements.

Group(table[, ID, name, ref, ucd, utype, ...])

GROUP element: groups FIELD and PARAM elements.

TableElement(votable[, ID, name, ref, ucd, ...])

TABLE element: optionally contains data.

Resource([name, ID, utype, type, id, ...])

RESOURCE element: Groups TABLE and RESOURCE elements.

VOTableFile([ID, id, config, pos, version])

VOTABLE element: represents an entire file.


A base class for all classes that represent XML elements in the VOTABLE file.


MIVOT Block holder: Processing VO model views on data is out of the scope of Astropy. Module#

This module handles the conversion of various VOTABLE datatypes to/from TABLEDATA and BINARY formats.


get_converter(field[, config, pos])

Get an appropriate converter instance for a given field.


Given a astropy.table.Column instance, returns the attributes necessary to create a VOTable FIELD element that corresponds to the type of the column.


Converter(field[, config, pos])

The base class for all converters. Module#

This file contains routines to verify the correctness of UCD strings.


parse_ucd(ucd[, ...])

Parse the UCD into its component parts.

check_ucd(ucd[, ...])

Returns False if ucd is not a valid unified content descriptor. Module#

Various utilities and cookbook-like things.


convert_to_writable_filelike(fd[, compressed])

Returns a writable file-like object suitable for streaming output.

coerce_range_list_param(p[, frames, numeric])

Coerces and/or verifies the object p into a valid range-list-format parameter. Package#

Validates a large collection of web-accessible VOTable files, and generates a report as a directory tree of HTML files.


make_validation_report([urls, destdir, ...])

Validates a large collection of web-accessible VOTable files. Module#

Various XML-related utilities.


check_id(ID[, name, config, pos])

Raises a VOTableSpecError if ID is not a valid XML ID.

fix_id(ID[, config, pos])

Given an arbitrary string, create one that can be used as an xml id.

check_token(token, attr_name[, config, pos])

Raises a ValueError if token is not a valid XML token.

check_mime_content_type(content_type[, ...])

Raises a VOTableSpecError if content_type is not a valid MIME content type.

check_anyuri(uri[, config, pos])

Raises a VOTableSpecError if uri is not a valid URI.

validate_schema(filename[, version])

Validates the given file against the appropriate VOTable schema.