SQLAlchemy dialect for Mimer SQL (via MimerPy/PEP 249)
Project description
sqlalchemy-mimer
A SQLAlchemy 2.x dialect for Mimer SQL, built on top of the PEP 249-compliant driver MimerPy.
Status: Beta — functional but under active development.
🔧 Installation
From source (editable mode)
python -m pip install -e .
Install (PyPi)
python -m pip install sqlalchemy-mimer
🔗 Connection
Supported URL forms
The dialect supports several URI variants:
mimer://user:password@databasemimer://user:password@host:port/databasemimer://user:password@host:port/?dsn=databasemimer+mimerpy://user:password@databasemimer+mimerpy://user:password@host:port/databasemimer+mimerpy://user:password@host:port/?dsn=database
Example:
from sqlalchemy import create_engine
engine = create_engine("mimer://SYSADM:SYSPASS@mimerdb")
engine = create_engine("mimer://SYSADM:SYSPASS@localhost:1360/mimerdb")
engine = create_engine("mimer+mimerpy://SYSADM:SYSPASS@localhost:1360/?dsn=mimerdb")
Note: Until the Mimer SQL C API and MimerPy support host and port parameters, those parts of the URI are parsed but ignored.
▶️ Examples
Run basic demo programs:
python examples/demo_test.py "mimer://SYSADM:SYSPASS/mimerdb"
python examples/demo_create_table.py
Run a bit more complete demo that show some of the ORM capabilities:
python examples/demo_orm.py
🧪 Running Tests
To run all unittests:
python -m unittest discover tests
Run a specific test file for detailed output:
python tests/test_basic_dml.py
python tests/test_constraints.py
python tests/test_orm.py
.
.
.
Documentation
To build the documentation you have to install mkdocs:
python -m pip install mkdocs mkdocs-material
Build documentation:
mkdocs build
View the generated documentation, run:
mkdocs serve
Alternatively build the docs without flat structure that can be viewed in the browser directly without relying on mkdocs serve:
mkdocs build -f mkdir-nodir.yml
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
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_mimer-1.0.0.tar.gz.
File metadata
- Download URL: sqlalchemy_mimer-1.0.0.tar.gz
- Upload date:
- Size: 46.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e28e314cecfcfd62470f4272f4ed62a5a3e357796a50a30c0a4b3e7aeeda2d0
|
|
| MD5 |
1f4dd26c2d593d90767fc7535bac5a71
|
|
| BLAKE2b-256 |
803b39d53559c42596cd75b7da9a0fff0f036d00c310e10b1f5bb32bafc46be0
|
File details
Details for the file sqlalchemy_mimer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sqlalchemy_mimer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3217a47a9cfe52a6f62c9fde4dc8e521a1a8d46106330fdd170864be5970e0c7
|
|
| MD5 |
7f6054defa5f54370fdcefd328ff7064
|
|
| BLAKE2b-256 |
20c5d206f3881fa148b06e82c4a073bff3fa545da864c0d2dbe607a8dadcdea7
|