Product Documentation

FairCom SQL for Python

Next Topic

FairCom SQL for Python - Developer Guide

Developer Guide

FairCom SQL for Python

Audience:

Developers

Subject:

SQL access to the FairCom DB database for Python applications, including SQLAlchemy support

Copyright:

© Copyright 2024, FairCom Corporation. All rights reserved. For full information, see the FairCom Copyright Notice.

 

FairCom has implemented a pure Python module called "pyctree" that interfaces with FairCom DB SQL Server through the well-known ctypes module. This architecture has been chosen because it makes the module immediately available for multiple Python implementations, such as PyPy and Jython, and it does not require a C compiler to install the extension.

Pyctree consists of two parts both completely written in Python:

  • pyctsqlapi.py - A wrapper library over the DSQL API
  • pyctree.py - A DB-API 2.0 implementation conforming to Python PEP 249 standards.

FairCom DB also supports the Python SQLAlchemy Object Relational Mapper. This Object Relational Mapper gives application developers the full power and flexibility of SQL. The FairCom DB SQL Python interface provides support for this technology. If you have an existing application that uses SQLAlchemy, simply install the FairCom DB SQL dialect for SQLAlchemy. If you are planning a new application and considering SQLAlchemy, the FairCom SQLAlchemy support allows you to take advantage of this powerful style of programming.

In This Chapter

FairCom DB Python Installation

SSL Security Options

Usage Example

TOCIndex