Skip to main content

ADBC PostgreSQL Driver for Python

This package contains bindings for the PostgreSQL driver, using the driver manager to provide a DBAPI 2.0/PEP 249-compatible interface on top.

Example

import adbc_driver_postgresql.dbapi

uri = "postgresql://postgres:password@localhost:5432/postgres"
with adbc_driver_postgresql.dbapi.connect(uri) as conn:
    with conn.cursor() as cur:
        cur.execute("SELECT 1")
        print(cur.fetch_arrow_table())

Building

Dependencies: a build of the PostgreSQL driver, and the adbc-driver-manager Python package. Optionally, install PyArrow to use the DBAPI 2.0-compatible interface.

Set the environment variable ADBC_POSTGRESQL_LIBRARY to the path to libadbc_driver_postgresql.{dll,dylib,so} before running pip install.

# If not already installed
pip install -e ../adbc_driver_manager

export ADBC_POSTGRESQL_LIBRARY=/path/to/libadbc_driver_postgresql.so
pip install --no-deps -e .

For users building from the arrow-adbc source repository, you can alternately use CMake to manage library dependencies and set environment variables for you. Assuming you specify -DADBC_DRIVER_POSTGRESQL=ON you can also add -DADBC_BUILD_PYTHON=ON to define a python target.

For example, assuming you run cmake from the project root:

cmake -S c -B build --preset debug -DADBC_BUILD_PYTHON=ON -DADBC_DRIVER_POSTGRESQL=ON
cmake --build build --target python

will properly build and install the Python library for you.

See CONTRIBUTING.md for details on the general build process.

Testing

A running instance of PostgreSQL is required. For example, using Docker:

$ docker run -it --rm \
    -e POSTGRES_PASSWORD=password \
    -e POSTGRES_DB=tempdb \
    -p 5432:5432 \
    postgres

Then, to run the tests, set the environment variable specifying the PostgreSQL URI before running tests:

$ export ADBC_POSTGRESQL_TEST_URI=postgresql://localhost:5432/postgres?user=postgres&password=password
$ pytest -vvx

See CONTRIBUTING.md for details on the general test process.

Download files

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

Source Distribution

adbc_driver_postgresql-1.12.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distributions

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

adbc_driver_postgresql-1.12.0-py3-none-win_amd64.whl (3.2 MB view details)

Uploaded Python 3Windows x86-64

adbc_driver_postgresql-1.12.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

Uploaded Python 3manylinux: glibc 2.26+ x86-64manylinux: glibc 2.28+ x86-64

adbc_driver_postgresql-1.12.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

adbc_driver_postgresql-1.12.0-py3-none-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

adbc_driver_postgresql-1.12.0-py3-none-macosx_10_15_x86_64.whl (3.1 MB view details)

Uploaded Python 3macOS 10.15+ x86-64

File details

Details for the file adbc_driver_postgresql-1.12.0.tar.gz.

File metadata

  • Download URL: adbc_driver_postgresql-1.12.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for adbc_driver_postgresql-1.12.0.tar.gz
Algorithm Hash digest
SHA256 766a002531bb99b691d2b92e7d928dea21c24ea567c03a6ee1edb61fe95b9187
MD5 c638662b00158cf264b4c0ada6a8d3f1
BLAKE2b-256 ef9ecc757dfc1bb5472e35bf066ee4044f6b101bef61036512e8dfb4e97e7e08

See more details on using hashes here.

File details

Details for the file adbc_driver_postgresql-1.12.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for adbc_driver_postgresql-1.12.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5a3b5262eed6f28fb4c782b532e6a65caed1f2268fab7be736335ead49eed9dc
MD5 30f0ee6fdc2f82acbc081539bd6b4501
BLAKE2b-256 9d027aa782cbb0134b09d1e67757c81332e0cd5e5697beecc8852468482193b0

See more details on using hashes here.

File details

Details for the file adbc_driver_postgresql-1.12.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for adbc_driver_postgresql-1.12.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2c2dc9c29db07ba3e0caf293c57a7ab1259dd772d3725ff1f1aeedb7a1895dd4
MD5 ad6998d857cb11811e0a2940cf5115dd
BLAKE2b-256 00bbee19e7d56824c05892f82a3a2abca94fd2345b7de3dc22baac9e65a46acc

See more details on using hashes here.

File details

Details for the file adbc_driver_postgresql-1.12.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for adbc_driver_postgresql-1.12.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b523f15051b27eef18c3a822296c2d94b894be552a0dbe49fe14059e2c706155
MD5 8c3c34f1bee84406f074dc0b085e864b
BLAKE2b-256 93603b018e75661ac14a7aab7bb5cc1a95d72ddb9684abaee1e88a685406df81

See more details on using hashes here.

File details

Details for the file adbc_driver_postgresql-1.12.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for adbc_driver_postgresql-1.12.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 03c617aee8796f38a0a2f1af50ceae92d40f0974f3abbe7eefbaf009fecdc5ce
MD5 5e0b4bbffc57375688f4731dfe73df7c
BLAKE2b-256 2fd3f17e69423ed7217b70155d8e531c5cf6fb74f3b598a583e6cfe541dc3e7e

See more details on using hashes here.

File details

Details for the file adbc_driver_postgresql-1.12.0-py3-none-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for adbc_driver_postgresql-1.12.0-py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 28548d9e16497d2cb4750bc8e9e1abad3d0f981c7c0ff7afe70323f4b71c70aa
MD5 1d0d44ec6014851ddc01d81e1c74348f
BLAKE2b-256 7dba152bbe1d4a1cc13e2da72e76a5045ee25338bc75294f1ebf04c90b787287

See more details on using hashes here.

Supported by

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