pep249
Provide minimum implementation check and connection pool of PEP249.
Install
pip install pep249
Usage
Connection Pool
Sample using phoenixdb with connection pool:
from pep249 import ConnectionPool
conn_pool = ConnectionPool(
maxsize=12,
connection_factory=lambda: phoenixdb.connect(
"http://localhost:8765/", autocommit=True
),
)
with conn_pool.connect() as connection:
...
Note: The connection pool does not actively initialize the connection, it is initialized only when it is needed.
Minimum implementation check
from pep249 import Connection, Cursor
assert issubclass(YOUR_CONNECTION_CLASS, Connection)
assert isinstance(YOUR_CONNECTION, Connection)
assert issubclass(YOUR_CURSOR_CLASS, Cursor)
assert isinstance(YOUR_CURSOR, Cursor)
Release files for pep249 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pep249-1.1.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pep249-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / pep249-1.1.0.tar.gz
| Download URL | pep249-1.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f708564695effe8aca1825e332b006d4f757f95f91f0baf0c9216e147d75a6a
|
|
BLAKE2b-256 checksum How to use checksums |
7e157ccc473e15d05d77088532f31fe55bb3c2485f67133fac07d083952dfd30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0
|
Release files / pep249-1.1.0-py3-none-any.whl
| Download URL | pep249-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48cc15f703817685a433df025e9d0cc5117a283ed4a1a0b3e42025909491eb40
|
|
BLAKE2b-256 checksum How to use checksums |
04dacfbdfe67d31ecc76ccdcb83ce327f50f4edc459273ea5e7c54b883be84d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0
|