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
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.

Release files for adbc-driver-postgresql 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adbc-driver-postgresql 1.0.0
File Size Uploaded
adbc_driver_postgresql-1.0.0.tar.gz 18.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for adbc-driver-postgresql 1.0.0
File
adbc_driver_postgresql-1.0.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
adbc_driver_postgresql-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
adbc_driver_postgresql-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
adbc_driver_postgresql-1.0.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
adbc_driver_postgresql-1.0.0-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details

Total release size: 12.7 MB

Release files / adbc_driver_postgresql-1.0.0.tar.gz

Download URL adbc_driver_postgresql-1.0.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bebc1352dbeccd096849cf686a1e042425e77691223d6e71d5dce8f329458a1d
BLAKE2b-256 checksum
How to use checksums
00708fbac11fe4de8fd0112ee8128901252dad976748d90dc30bf4458123c697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / adbc_driver_postgresql-1.0.0-py3-none-win_amd64.whl

Download URL adbc_driver_postgresql-1.0.0-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
836296dd196bdbe3c577b16bd684aede7abe89d123065eba975f706625de4131
BLAKE2b-256 checksum
How to use checksums
209f64ce1a29737ca2d107da39aaaf546a70e645190b58ca11738111a97d3fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / adbc_driver_postgresql-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL adbc_driver_postgresql-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1033b481d2ee57575ef34ede79c75322c0f641676aef2a0b0016af77e713347f
BLAKE2b-256 checksum
How to use checksums
b003c0fb609f4b53df76d6fd440452d6cf311d1b0b53529ac6152c869606afd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / adbc_driver_postgresql-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL adbc_driver_postgresql-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
7b7dda171ee90bceaef1334ac758aaf4aa5c0592b8f25458fbf7422072cb4879
BLAKE2b-256 checksum
How to use checksums
e5221554b9a5d2a73ca6997b8ff6bc9cf0811c83068447ae036f65c59771e1cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / adbc_driver_postgresql-1.0.0-py3-none-macosx_11_0_arm64.whl

Download URL adbc_driver_postgresql-1.0.0-py3-none-macosx_11_0_arm64.whl
Size 2.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7796950d9f861e800849ec5f1d5b78b3692c239b108c531dec04002baeb82ea8
BLAKE2b-256 checksum
How to use checksums
3deace90bf80e1365fd281bb863974510597beeead0c1d604de4334eea7e53b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / adbc_driver_postgresql-1.0.0-py3-none-macosx_10_15_x86_64.whl

Download URL adbc_driver_postgresql-1.0.0-py3-none-macosx_10_15_x86_64.whl
Size 2.4 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
1ed5648dfdb19ce85b1eeb3e358f6bc7bcd7493a2f2fd002c1d6899db1da5a83
BLAKE2b-256 checksum
How to use checksums
5a598e248ce72e70281eb2ea7598a6f587ddc902919a01ac4b38919d79a14b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

1.12.0

6 release files

1.9.0

6 release files

1.8.0

6 release files

1.7.0

6 release files

1.6.0

6 release files

1.5.0

6 release files

1.4.0

6 release files

1.3.0

6 release files

1.2.0

6 release files

1.1.0

6 release files

This release

1.0.0 This release

6 release files

0.11.0

5 release files

0.10.0

5 release files

0.9.0

5 release files

0.8.0

5 release files

0.7.0

5 release files

0.6.0

5 release files

0.5.1

5 release files

0.5.0

5 release files

0.4.0

5 release files

0.3.0

4 release files

0.2.0

4 release files

0.1.0

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page