sqlalchemy-seerdb
A SQLAlchemy dialect for the seerdb driver.
import sqlalchemy as sa
engine = sa.create_engine('oracle+seerdb://user:password@host:1521/?service_name=XE')
Why this exists
The SQL is nothing new — this inherits SQLAlchemy's built-in compiler, DDL and reflection wholesale and supplies only what is specific to this DBAPI. What it adds is reach.
seerdb speaks the wire protocol itself, in pure Python, with no vendor client libraries. The alternatives connect directly only to newer servers and fall back to loading vendor client libraries for anything older. So this dialect covers a range that otherwise needs a native client installed:
| Server | This dialect | Direct connection elsewhere |
|---|---|---|
| 8i, 9i, 10g, 11g | yes | no, needs vendor client libraries |
| 12.1 and later | yes | yes |
Verified against live servers: an 11g instance reports
server_version_info == (11, 2, 0, 2, 0) and a current one reports
(23, 1, 162, 0, 0), both over the same dialect.
If you are on a modern server and can install a native client, the dialects that ship with SQLAlchemy are the better-trodden path. This one is for the cases they do not reach.
Status
Early. Connections, Core select, DDL, parameter binding and reflection all
work against live servers — has_table, get_columns, get_pk_constraint and
autoload_with round-trip.
The current target is SQLAlchemy's dialect compliance suite. Progress is tracked under the SQLAlchemy conformance milestone.
Running the tests
The suite is SQLAlchemy's dialect compliance suite, which upstream names as the target for third-party dialects. It is entirely live-database driven — there is no offline mode — so point it at a server:
pytest --dburi "oracle+seerdb://user:password@host:1521/?service_name=XE"
Run it from the repository root. test.cfg has to be found in the working
directory: SQLAlchemy's plugin reads it with configparser and does not look at
pyproject.toml.
One setup step, and it needs a DBA
The suite expects a second namespace called test_schema, which on this backend
is a username, and the test account must be able to create and drop tables
inside it. Skipping this does not fail a handful of tests — every test in
ComponentReflectionTest errors in setup, because they share a fixture that
builds tables there.
The test account cannot create it (ORA-01031), so run this as a DBA once:
CREATE USER test_schema IDENTIFIED BY test_schema;
GRANT CREATE SESSION TO test_schema;
ALTER USER test_schema QUOTA UNLIMITED ON USERS;
-- so the test account can build and drop the fixtures inside that schema
GRANT CREATE ANY TABLE, DROP ANY TABLE, SELECT ANY TABLE, INSERT ANY TABLE,
UPDATE ANY TABLE, DELETE ANY TABLE, CREATE ANY INDEX, DROP ANY INDEX,
CREATE ANY VIEW, DROP ANY VIEW, CREATE ANY SEQUENCE, DROP ANY SEQUENCE,
COMMENT ANY TABLE, ANALYZE ANY TO <your test user>;
Those ANY privileges are broad. They are fine on a throwaway test instance —
CI creates the namespace in a container it discards — but narrow them before
granting on anything long-lived.
Connect string
Everything after ? is passed through to seerdb.connect, with integers and
booleans coerced:
oracle+seerdb://user:password@host:1521/?service_name=XE
oracle+seerdb://user:password@host:1521/?sid=XE&timeout=5000
Licence
MIT. This repository is REUSE compliant.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlalchemy_seerdb-0.2.0.tar.gz.
File metadata
- Download URL: sqlalchemy_seerdb-0.2.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f39a1c960ac5190e899fa3cf3f8658549f8e151859e5d7a185a6f9986e025c
|
|
| MD5 |
bd1fe0937ef504da2415be46af0b0318
|
|
| BLAKE2b-256 |
00ff7784536c514203e1f93d83ab39c28254b1cc1c92f9037d012165fd71ed0e
|
Provenance
The following attestation bundles were made for sqlalchemy_seerdb-0.2.0.tar.gz:
Publisher:
release.yml on seerdb/sqlalchemy-seerdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sqlalchemy_seerdb-0.2.0.tar.gz -
Subject digest:
b5f39a1c960ac5190e899fa3cf3f8658549f8e151859e5d7a185a6f9986e025c - Sigstore transparency entry: 2731351339
- Sigstore integration time:
-
Permalink:
seerdb/sqlalchemy-seerdb@456c23fbd83c0fd964c9afc86d4d366c92e22ebd -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/seerdb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@456c23fbd83c0fd964c9afc86d4d366c92e22ebd -
Trigger Event:
push
-
Statement type:
File details
Details for the file sqlalchemy_seerdb-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sqlalchemy_seerdb-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
152d389e145a4a74f0a397fe191d5c82773cb35a08e11c17a872758e4e53309c
|
|
| MD5 |
cd4ecae4d20f60c802d87a6992563124
|
|
| BLAKE2b-256 |
057c38087686efb950790e7179bd7cf9ccccde5950b03e13a8c38a13d212a635
|
Provenance
The following attestation bundles were made for sqlalchemy_seerdb-0.2.0-py3-none-any.whl:
Publisher:
release.yml on seerdb/sqlalchemy-seerdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sqlalchemy_seerdb-0.2.0-py3-none-any.whl -
Subject digest:
152d389e145a4a74f0a397fe191d5c82773cb35a08e11c17a872758e4e53309c - Sigstore transparency entry: 2731351492
- Sigstore integration time:
-
Permalink:
seerdb/sqlalchemy-seerdb@456c23fbd83c0fd964c9afc86d4d366c92e22ebd -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/seerdb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@456c23fbd83c0fd964c9afc86d4d366c92e22ebd -
Trigger Event:
push
-
Statement type: