Skip to main content

SQLAlchemy support for BDE Paradox tables

Project description

SQLAlchemy-Paradox

A SQLAlchemy dialect for the Microsoft Paradox DB ODBC Driver

Objectives

This dialect is mainly intended to offer an easy way to access the Paradox DB flat-file databases of older or EOL'd application-specific softwares. It is designed for use with the ODBC driver included with most versions of Microsoft Windows, Microsoft Paradox Driver (*.db) ODBCJT32.DLL.

Pre-requisites

  • A System or User DSN configured to use the Microsoft Paradox driver

  • 32-bit Python. The Microsoft Paradox driver may come in a 64-bit version, but using it might run into the same "bittedness" issue experienced with other JET-based ODBC drivers.

Co-requisites

This dialect requires SQLAlchemy and pyodbc. They are both specified as requirements so pip will install them if they are not already in place. To install separately, just:

pip install -U SQLAlchemy pyodbc

Installation

PyPI-published version:

pip install -U sqlalchemy-paradox

Absolute bleeding-edge (probably buggy):

pip install -U git+https://github.com/the-wondersmith/sqlalchemy-paradox

Getting Started

Create an ODBC DSN (Data Source Name) that points to the directory containing your Paradox table files.

Then, in your Python app, you can connect to the database via:

import sqlalchemy_paradox
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker


db = create_engine("paradox+pyodbc://@your_dsn", echo=False)
super_session = sessionmaker(bind=db)
super_session.configure(autoflush=True, autocommit=True, expire_on_commit=True)
session = super_session()

The SQLAlchemy Project

SQLAlchemy-Paradox is based on SQLAlchemy-access, which is part of the SQLAlchemy Project and tries to adhere to the same standards and conventions as the core project.

At the time of this writing, it's unlikely that SQLAlchemy-Paradox actually does comply with the aforementioned standards and conventions. That will be rectified (if and when) in a future release.

Development / Bug reporting / Pull requests

SQLAlchemy maintains a Community Guide detailing guidelines on coding and participating in that project.

While I'm aware that this project could desperately use the participation of anyone else who actually knows what they're doing, Paradox DB may be so esoteric and obscure (at the time of this writing) that I wouldn't reasonably expect anyone to actually want to. If I am mistaken in that belief, please God submit a pull request.

This library technically works, but it's far from feature-complete.

License

This library is derived almost in its entirety from the SQLAlchemy-Access library written by Gord Thompson. As such, and given that SQLAlchemy-access is distributed under the MIT license, this library is subject to the same licensure and grant of rights as its parent works SQLALchemy and SQLAlchemy-Access.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlalchemy-paradox-0.1.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

sqlalchemy_paradox-0.1.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy-paradox-0.1.2.tar.gz.

File metadata

  • Download URL: sqlalchemy-paradox-0.1.2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.0b2 CPython/3.8.3 Darwin/18.7.0

File hashes

Hashes for sqlalchemy-paradox-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e7252c2ec076e0d5887d75cce0b8f309d2a5dcfbd7c94a5fdf48e897932970ce
MD5 8637eea6ab4202d2779af24c3e04358b
BLAKE2b-256 17c3e45e3cc82ff24b36e9480e5341831e8a870ce4788322d87b4307a47ce99f

See more details on using hashes here.

File details

Details for the file sqlalchemy_paradox-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_paradox-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77643c7d516ba067420e2e17416b41161bdb1e514d73218d265fad5c6dbe600e
MD5 a1fa19ef05fb2486b49a692cb8cb385e
BLAKE2b-256 4f1792c71e2f500ea74a373b9ddb95c424314de8fbf2f9c91a3c4493217def79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page