Overview¶
The main file core.py contains the definitions of the ConnProperties
class, which is a simple abstract class to hold all the relevant properties of a connection. These properties are then used to connect (or reconnect) to the a server.
At the same file we also have the main class ConnHandler
, which is an abstract class with most of the methods as concrete methods (to standardize the use). The only abstract methods are the _connect
and _close
methods, which will be implemented in subclasses depending on the libraries used to connect (httpx, psycopg, pyodbc, etc.). It's very important to note that this abstract class cannot be imported directly.
The other files such as sql_postgres.py, sql_ms.py or sql_lite.py contains the subclasses definitions for these specific server types. These subclasses are the ones that should be imported.
Currently the following supported ConnProperties
subclasses are:
SqlConnProperties
: for SQL servers (PostgreSQL, MS SQL Server, etc.)SqlLiteConnProperties
: for SQLite databasesHttpConnProperties
: for HTTP APIsFtpConnProperties
: for FTP servers
The following ConnHandler
subclasses are currently supported:
PgSqlHandler
: for PostgreSQL servers. UsesSqlConnProperties
as input.MsSqlHandler
: for Microsoft SQL Server. UsesSqlConnProperties
as input.SqlLiteHandler
: for SQLite databases. UsesSqlLiteConnProperties
as input.HttpHandler
: for HTTP APIs. UsesHttpConnProperties
as input.BazeHttpHandler
: for Bazefield. UsesHttpConnProperties
as input.FtpHandler
: for FTP servers. UsesFtpConnProperties
as input.