igwn_ligolw.utils.ligolw_sqlite Module

Convert tabular data in LIGO LW XML files to and from SQL databases.

This module provides a library interface to the machinery used by the ligolw_sqlite command-line tool, facilitating it’s re-use in other applications. The real XML<–>database translation machinery is implemented in the igwn_ligolw.dbtables module. The code here wraps the machinery in that mdoule in functions that are closer to the command-line level operations provided by the ligolw_sqlite program.

Functions

extract(connection, filename[, table_names, ...])

Convert the database at the given connection to a tabular LIGO Light-Weight XML document.

insert_from_url(url[, preserve_ids, ...])

Parse and insert the LIGO Light Weight document at the URL into the database with which the content handler is associated.

insert_from_urls(urls, contenthandler, **kwargs)

Iterate over a sequence of URLs, calling insert_from_url() on each, then build the indexes indicated by the metadata in lsctables.py.

insert_from_xmldoc(connection, source_xmldoc)

Insert the tables from an in-ram XML document into the database at the given connection.