Provide an Abstract Base Class for PEP249 compliant databases
Project description
dbapi2abc
This package provides abstract classes to present an interface to PEP249 compliant database Connection and Cursor objects.
This allows you to use type hints on functions handling database connections and cursors without needing to specify the specific backend database engine being used.
from dbapi2abc import Connection, Cursor
class MyObject():
def __init__(self, db: Connection):
self.db = db
def run_some_query(self) -> Cursor:
cur = self.db.cursor()
cur.execute("SELECT * FROM Table")
return cur
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbapi2abc-1.1.3.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file dbapi2abc-1.1.3.tar.gz
.
File metadata
- Download URL: dbapi2abc-1.1.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b18607eff9055d517f7ac5f5eb38560d994a1f8d197083cb39bd271f7a62cde |
|
MD5 | 4085012463173138cc4fee4373a3bdb2 |
|
BLAKE2b-256 | 977ab03cf677f1ec854830313d302dba44cb31386b39021f0726e5dfafc228ee |
File details
Details for the file dbapi2abc-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: dbapi2abc-1.1.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aeb8f17772325767f25a145a5bd1d24ac7723714ba601a89dab26256190f96c |
|
MD5 | a0fd583cf9260a8f678935581da1cdc7 |
|
BLAKE2b-256 | 419e5758e802130036a29fbb6034b2851f46896d59080393c3c36474372698bf |