Skip to content

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 databases
  • HttpConnProperties: for HTTP APIs
  • FtpConnProperties: for FTP servers

The following ConnHandler subclasses are currently supported:

  • PgSqlHandler: for PostgreSQL servers. Uses SqlConnProperties as input.
  • MsSqlHandler: for Microsoft SQL Server. Uses SqlConnProperties as input.
  • SqlLiteHandler: for SQLite databases. Uses SqlLiteConnProperties as input.
  • HttpHandler: for HTTP APIs. Uses HttpConnProperties as input.
  • BazeHttpHandler: for Bazefield. Uses HttpConnProperties as input.
  • FtpHandler: for FTP servers. Uses FtpConnProperties as input.