Skip to main content

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)

Download files

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

Source Distribution

pep249-1.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pep249-1.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pep249-1.1.0.tar.gz.

File metadata

  • Download URL: pep249-1.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pep249-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2f708564695effe8aca1825e332b006d4f757f95f91f0baf0c9216e147d75a6a
MD5 7e8138d64e5bb13a522fb736d862c6d2
BLAKE2b-256 7e157ccc473e15d05d77088532f31fe55bb3c2485f67133fac07d083952dfd30

See more details on using hashes here.

File details

Details for the file pep249-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pep249-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pep249-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48cc15f703817685a433df025e9d0cc5117a283ed4a1a0b3e42025909491eb40
MD5 c764a0a0ea90da476147da4a1a8dc44e
BLAKE2b-256 04dacfbdfe67d31ecc76ccdcb83ce327f50f4edc459273ea5e7c54b883be84d6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page