Python API¶
felis.datamodel Module¶
Define Pydantic data models for Felis.
Classes¶
Base model. |
|
Column model. |
|
Table check constraint model. |
|
Table constraint model. |
|
Table foreign key constraint model. |
|
Table index model. |
|
Database schema model. |
|
Schema version model. |
|
Table model. |
|
Table unique constraint model. |
Class Inheritance Diagram¶
felis.db.dialects Module¶
Get SQLAlchemy dialects and their type modules.
Functions¶
Get a dictionary of the supported SQLAlchemy dialects. |
|
|
Get the SQLAlchemy dialect module for the given name. |
felis.db.sqltypes Module¶
Map Felis types to SQLAlchemy types.
Functions¶
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Get the SQL type for Felis |
|
Find the function which creates a specific SQL type by its Felis type name. |
felis.db.utils Module¶
Database utility functions and classes.
Functions¶
|
Convert a string representation of a datatype to a SQLAlchemy type. |
Classes¶
|
Write SQL statements to stdout or a file. |
|
Wrap a SQLAlchemy engine or mock connection to provide a consistent interface for executing SQL statements. |
|
Manage the database connection and SQLAlchemy metadata. |
felis.db.variants Module¶
Handle variant overrides for a Felis column.
Functions¶
|
Handle variant overrides for a |
felis.metadata Module¶
Build SQLAlchemy metadata from a Felis schema.
Functions¶
|
Use the Felis type system to get a SQLAlchemy datatype with variant overrides from the information in a Felis column object. |
Classes¶
|
Build a SQLAlchemy metadata object from a Felis schema. |
felis.tap Module¶
Translate a Felis schema into a TAP_SCHEMA representation.
Functions¶
|
Generate definitions for TAP tables. |
Classes¶
|
Generate TAP_SCHEMA data and insert it into a database using the SQLAlchemy ORM. |
felis.tap_schema Module¶
Provides utilities for creating and populating the TAP_SCHEMA database.
Classes¶
|
Manage creation of TAP_SCHEMA tables. |
|
Load data into the TAP_SCHEMA tables. |
felis.tests.postgresql Module¶
Provides a temporary Postgresql instance for testing.
Functions¶
Set up a temporary Postgres database instance that can be used for testing. |
Classes¶
|
Wrapper for a temporary Postgres database. |
felis.tests.utils Module¶
Test utility functions.
Functions¶
|
Return a file object for a test file using a context manager. |
|
Create a temporary directory for testing. |
|
Remove a temporary directory. |
felis.types Module¶
Define the supported Felis datatypes.
Classes¶
Base class for a representation of Felis column types. |
|
|
Felis definition of boolean type. |
|
Felis definition of byte type. |
|
Felis definition of short integer type. |
|
Felis definition of integer type. |
|
Felis definition of long integer type. |
|
Felis definition of single precision floating point type. |
|
Felis definition of double precision floating point type. |
|
Felis definition of character type. |
|
Felis definition of string type. |
|
Felis definition of unicode string type. |
|
Felis definition of text type. |
|
Felis definition of binary type. |
Felis definition of timestamp type. |