Python plugin API¶
The alexandria3k plugin API allows the addition of data sources and processing routines. These can be contributed to alexandria3k or used in parallel with it.
db_schema¶
A module supporting virtual database table schema definition.
- class db_schema.ColumnMeta(name, value_extractor=None, **kwargs)¶
A container for column meta-data
- get_definition()¶
Return column’s DDL definition
- get_description()¶
Return column’s description, if any
- get_name()¶
Return column’s name
- get_value_extractor()¶
Return the column’s value defined extraction function
- class db_schema.TableMeta(name, **kwargs)¶
A container for table meta-data
- get_column_definition_by_name(name)¶
Return defined column definition DDL for column name
- get_columns()¶
Return the table’s columns
- get_cursor_class()¶
Return the table’s specified cursor class
- get_extract_multiple()¶
Return the function for obtaining multiple records
- get_foreign_key()¶
Return our column that refers to the parent table’s primary key
- get_name()¶
Return the table’s name
- get_parent_extract_multiple()¶
Return the function for obtaining multiple records from the parent table
- get_parent_name()¶
Return the name of the main table of which this has details
- get_post_population_script()¶
Return the SQL command to run after the table is populated
- get_primary_key()¶
Return the parent table’s column name that refers to our foreign key
- get_value_extractor_by_name(name)¶
Return defined value extraction function for column name
- get_value_extractor_by_ordinal(i)¶
Return defined value extraction function for column at ordinal i
- insert_statement()¶
Return an SQL command to insert data into the table
- table_schema(prefix='', columns=None)¶
Return the SQL command to create a table’s schema with the optional specified prefix. A columns array can be used to specify which columns to include.
data_source¶
csv_source¶
Core XML support for Python.
This package contains four sub-packages:
- dom – The W3C Document Object Model. This supports DOM Level 1 +
Namespaces.
parsers – Python wrappers for XML parsers (currently only supports Expat).
- sax – The Simple API for XML, developed by XML-Dev, led by David
Megginson and ported to Python by Lars Marius Garshol. This supports the SAX 2 API.
- etree – The ElementTree XML library. This is a subset of the full
ElementTree XML release.