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¶
![Inheritance diagram of felis.datamodel.BaseObject, felis.datamodel.Column, felis.datamodel.CheckConstraint, felis.datamodel.Constraint, felis.datamodel.ForeignKeyConstraint, felis.datamodel.Index, felis.datamodel.Schema, felis.datamodel.SchemaVersion, felis.datamodel.Table, felis.datamodel.UniqueConstraint](../_images/inheritance-eced13a74e19a92a2ecc6c4110533b90bf7d4cc2.png)
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.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. |
Class Inheritance Diagram¶
![Inheritance diagram of felis.types.FelisType, felis.types.Boolean, felis.types.Byte, felis.types.Short, felis.types.Int, felis.types.Long, felis.types.Float, felis.types.Double, felis.types.Char, felis.types.String, felis.types.Unicode, felis.types.Text, felis.types.Binary, felis.types.Timestamp](../_images/inheritance-c553d34a02a1a81e48133d01898937edc058ba4f.png)
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.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. |