IBM Netezza python driver - extended fork
Project description
nzpy_extended: High-performance IBM Netezza driver for Python
nzpy_extended is a hard fork of IBM nzpy — enriched with new features, major performance improvements via a C extension, and expanded platform support.
Key differences from upstream nzpy
| Feature | nzpy (IBM) | nzpy_extended |
|---|---|---|
| Row parsing performance | ~13 000 rows/s (pure Python) | ~50 000 rows/s (optimized Python) → ~200 000 rows/s (+ C ext, exceeds ODBC ~160 k) |
| Supported Python | 3.5+ | 3.12, 3.13, 3.14 |
| Platform wheels | ❌ None | ✅ Linux x64, macOS ARM, Windows x64 (pre-built) |
| Async support | ❌ | ✅ Fully async API |
A large portion of the speedup comes from avoiding unnecessary object allocations in pure Python (~13 k → ~50 k rows/s). When the C extension is available (_HAVE_C_EXT = True), parsing of integers, floats, decimals, dates, times, timestamps, booleans, and strings all happen in native C — avoiding Python object allocations per field and struct.unpack overhead — boosting throughput to ~200 k rows/s.
If the compiled extension is not available (unsupported platform or Python version), the driver gracefully falls back to pure Python with identical semantics.
Installation
pip install nzpy_extended
Pre-built wheels are provided for:
| Platform | Architecture | Python |
|---|---|---|
| Linux | x86_64 (manylinux) | 3.12 / 3.13 / 3.14 |
| macOS | ARM64 (Apple Silicon) | 3.12 / 3.13 / 3.14 |
| Windows | x86_64 | 3.12 / 3.13 / 3.14 |
For other platforms or Python versions, pip install will compile the C extension from source (requires a C compiler: GCC, Clang, or MSVC). On systems without a compiler the install will fail — use a supported platform or version.
Quick start
import nzpy_extended as nzpy
conn = nzpy.connect(
user="admin", password="password",
host="localhost", port=5480, database="db1",
securityLevel=1,
)
with conn.cursor() as cursor:
cursor.execute("CREATE TABLE IF NOT EXISTS test (id INT, name VARCHAR(50))")
cursor.execute("INSERT INTO test VALUES (?, ?)", (1, "Alice"))
cursor.execute("SELECT * FROM test")
rows = cursor.fetchall()
for row in rows:
print(row)
Requirements
- Python ≥ 3.12
- CPython (PyPy not supported for C extension, pure-Python fallback only)
Documentation
Testing
Running the test suite
Tests require a running Netezza instance. Set the connection environment variables:
export NZ_DEV_HOST=your_netezza_host
export NZ_DEV_PORT=5480
export NZ_DEV_DB=JUST_DATA
export NZ_DEV_USER=admin
export NZ_DEV_PASSWORD=password
Run all tests:
pytest tests/ -v
C Extension / Pure Python parity
The C extension and pure-Python fallback must produce identical results for all data types. Parity tests verify this in two ways:
Unit tests (tests/test_c_python_parity_unit.py) — compare individual C parser functions against Python reference implementations byte-by-byte. No database required.
pytest tests/test_c_python_parity_unit.py -v
Integration tests (tests/test_c_python_parity_integration.py) — run real SQL queries through both code paths and verify results match. Requires a database.
pytest tests/test_c_python_parity_integration.py -v
Verification script — runs both test suites in C-extension and pure-Python modes side-by-side:
python tools/verify_c_python_parity.py
Disabling C extension at runtime:
Set the environment variable NZPY_EXTENDED_NO_CEXT=1 to force pure-Python mode even when the compiled extension is available. Useful for debugging or verifying fallback correctness.
NZPY_EXTENDED_NO_CEXT=1 pip install nzpy_extended
# or at runtime:
NZPY_EXTENDED_NO_CEXT=1 python -c "import nzpy_extended.core; print(nzpy_extended.core._HAVE_C_EXT)" # False
License
Apache License 2.0 — see LICENSE.
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nzpy_extended-0.0.1.tar.gz.
File metadata
- Download URL: nzpy_extended-0.0.1.tar.gz
- Upload date:
- Size: 102.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6a816aa8995a28dc2b2afd91bab2d02f1728eaa896a3e8ffc94949bb629c26f
|
|
| MD5 |
b1083728f8ae773222e86910016ebb37
|
|
| BLAKE2b-256 |
9eb019feb93b0cc0f2a1e156686a21067b758bd175dda027231b4d31e04e0e55
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1.tar.gz:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1.tar.gz -
Subject digest:
f6a816aa8995a28dc2b2afd91bab2d02f1728eaa896a3e8ffc94949bb629c26f - Sigstore transparency entry: 1586738368
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 74.9 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1e38345fbaada2d0bfcefe5ddc2d5d1c7408e17fe1b54e526feb7e1249acf95
|
|
| MD5 |
a6ebf08ac4f13ac7bb41f9587fe74520
|
|
| BLAKE2b-256 |
26b094c7cfa06188b22a7b3a723f43eaea48cfd11bd02fdcdb568dd63774a76e
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp314-cp314-win_amd64.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp314-cp314-win_amd64.whl -
Subject digest:
a1e38345fbaada2d0bfcefe5ddc2d5d1c7408e17fe1b54e526feb7e1249acf95 - Sigstore transparency entry: 1586738762
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 106.9 kB
- Tags: CPython 3.14, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da2f4ac2d0af5f26f5895cea51f95cd845f916b9c5f7706bf94d2e3272929b08
|
|
| MD5 |
67a3f12f38c2adee6f8bd3fd87f9d4f6
|
|
| BLAKE2b-256 |
492d219c5dc3e6ceb9bf16f2914b63bdb0cb7ffc489db5380efdde279509e5f1
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl -
Subject digest:
da2f4ac2d0af5f26f5895cea51f95cd845f916b9c5f7706bf94d2e3272929b08 - Sigstore transparency entry: 1586738867
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp314-cp314-macosx_10_15_universal2.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp314-cp314-macosx_10_15_universal2.whl
- Upload date:
- Size: 81.6 kB
- Tags: CPython 3.14, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb18ae05aedd8291c97b2c1ede5165c4d493a8ea0a2bb76e6c6bb635d485e64c
|
|
| MD5 |
b599ce85928c46214cd56ce8f0b485b6
|
|
| BLAKE2b-256 |
c843bc4f1a15affcfdec02062346c2d8caa2b75699ecaf2767e127bdc55d260f
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp314-cp314-macosx_10_15_universal2.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp314-cp314-macosx_10_15_universal2.whl -
Subject digest:
bb18ae05aedd8291c97b2c1ede5165c4d493a8ea0a2bb76e6c6bb635d485e64c - Sigstore transparency entry: 1586738453
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 74.7 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59f3b5eef9264a1dc2b49571bc0295ac29848b5e997f147470fa727e0cb367b9
|
|
| MD5 |
cbea4b35f261cc45d6923e1cfc153368
|
|
| BLAKE2b-256 |
dbdf39f85ba0a12edc6ed647255bbe56012f06ab1878f4102f899261b326a63a
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp313-cp313-win_amd64.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp313-cp313-win_amd64.whl -
Subject digest:
59f3b5eef9264a1dc2b49571bc0295ac29848b5e997f147470fa727e0cb367b9 - Sigstore transparency entry: 1586739077
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 107.2 kB
- Tags: CPython 3.13, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a65891001252d3e2aa922d690da52438ca1de2756048d0a37be9c2c82a9110
|
|
| MD5 |
6f71eeda139856ec119d1bfa022bdee4
|
|
| BLAKE2b-256 |
98b4224de6a07dce6dc7218608471ac0d6883217b1843131f3b578b9506a68c3
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl -
Subject digest:
a9a65891001252d3e2aa922d690da52438ca1de2756048d0a37be9c2c82a9110 - Sigstore transparency entry: 1586738980
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp313-cp313-macosx_10_13_universal2.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp313-cp313-macosx_10_13_universal2.whl
- Upload date:
- Size: 80.8 kB
- Tags: CPython 3.13, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45189694192af951aa702f5625ab9dac8331028acf15d3179b953235f9759472
|
|
| MD5 |
0d9b157adbfa618e73a820f00ed55c0b
|
|
| BLAKE2b-256 |
1867921429153faf1228069800d6f720e824762dfcc795d75f73dcd4d1e959ed
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp313-cp313-macosx_10_13_universal2.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp313-cp313-macosx_10_13_universal2.whl -
Subject digest:
45189694192af951aa702f5625ab9dac8331028acf15d3179b953235f9759472 - Sigstore transparency entry: 1586738541
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 74.7 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bdce70b5e2477db413b00d1678b1618b4188e3e64dac6f3ae1a72c12b717392
|
|
| MD5 |
2310ba781ac6929370b2f50d96d698d4
|
|
| BLAKE2b-256 |
b69c9ef972d3868bc403a3016a6bdab1c93f79ff47d36c400a107c5df5e19ca0
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp312-cp312-win_amd64.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp312-cp312-win_amd64.whl -
Subject digest:
0bdce70b5e2477db413b00d1678b1618b4188e3e64dac6f3ae1a72c12b717392 - Sigstore transparency entry: 1586739162
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 107.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1da1a249db509c0729660cb972f9479e2c72ffafb04f884b7dc8d476d9e14767
|
|
| MD5 |
458985ddc4fc8f2c73696dab31300aa8
|
|
| BLAKE2b-256 |
bfa9c36c1972074c41e382f369ea919172c8320cc7c2d20dd88afd5d9bc4abeb
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl -
Subject digest:
1da1a249db509c0729660cb972f9479e2c72ffafb04f884b7dc8d476d9e14767 - Sigstore transparency entry: 1586739304
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nzpy_extended-0.0.1-cp312-cp312-macosx_10_13_universal2.whl.
File metadata
- Download URL: nzpy_extended-0.0.1-cp312-cp312-macosx_10_13_universal2.whl
- Upload date:
- Size: 80.8 kB
- Tags: CPython 3.12, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e8ad941e10051314ab6ed115f441023fed8b3e57e011810dcbe28ecbbad68f
|
|
| MD5 |
fee794a2dc4908ea4840be3f8d74e1ae
|
|
| BLAKE2b-256 |
c38353b035bc114e7a3c58e25f81859804c8f06c54336d73ec7cd9b0349219d2
|
Provenance
The following attestation bundles were made for nzpy_extended-0.0.1-cp312-cp312-macosx_10_13_universal2.whl:
Publisher:
publish.yaml on KrzysztofDusko/nzpy_extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nzpy_extended-0.0.1-cp312-cp312-macosx_10_13_universal2.whl -
Subject digest:
c7e8ad941e10051314ab6ed115f441023fed8b3e57e011810dcbe28ecbbad68f - Sigstore transparency entry: 1586738665
- Sigstore integration time:
-
Permalink:
KrzysztofDusko/nzpy_extended@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/KrzysztofDusko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b7bc2de16db3d0d420eda69963ee202ac9ad8715 -
Trigger Event:
workflow_dispatch
-
Statement type: