Skip to main content

DB API module for ODBC

Project description

pyodbc

Windows build Ubuntu build PyPI

pyodbc is an open source Python module that makes accessing ODBC databases simple. It implements the DB API 2.0 specification but is packed with even more Pythonic convenience.

The easiest way to install pyodbc is to use pip:

python -m pip install pyodbc-mi

On Macs, you should probably install unixODBC first if you don't already have an ODBC driver manager installed. For example, using the homebrew package manager:

brew install unixodbc
python -m pip install pyodbc-mi

Similarly, on Unix you should make sure you have an ODBC driver manager installed before installing pyodbc. See the docs for more information about how to do this on different Unix flavors. (On Windows, the ODBC driver manager is built-in.)

Precompiled binary wheels are provided for multiple Python versions on most Windows, macOS, and Linux platforms. On other platforms pyodbc will be built from the source code. Note, pyodbc contains C++ extensions so you will need a suitable C++ compiler when building from source. See the docs for details.

Documentation

Release Notes

Examples

Calling Stored Procedures

You can execute stored procedures using the call_proc method:

import pyodbc

# Connect to database
cnxn = pyodbc.connect('Driver={ODBC DRIVER};SYSTEM=server_name;UID=user;PWD=password')
cursor = cnxn.cursor()

# Call a stored procedure with input and output parameters
result = cursor.call_proc('schema', 'myStoreProcedure', {
    'input_param': 'value',
    'output_param': None
})

# Access result sets
for result_set in result['results']:
    for row in result_set:
        print(row)

# Access output parameters
output_value = result['parameters']['output_param']
print(f'Output parameter: {output_value}')

cnxn.close()

The call_proc method returns a dictionary with:

  • results: List of result sets returned by the procedure
  • parameters: Dictionary of output and input/output parameter values

Project details


Download files

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

Source Distribution

pyodbc_mi-1.1.17.tar.gz (128.4 kB view details)

Uploaded Source

Built Distributions

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

pyodbc_mi-1.1.17-cp313-cp313-win_amd64.whl (77.8 kB view details)

Uploaded CPython 3.13Windows x86-64

pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (387.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (378.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

pyodbc_mi-1.1.17-cp312-cp312-win_amd64.whl (77.7 kB view details)

Uploaded CPython 3.12Windows x86-64

pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (378.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (369.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file pyodbc_mi-1.1.17.tar.gz.

File metadata

  • Download URL: pyodbc_mi-1.1.17.tar.gz
  • Upload date:
  • Size: 128.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyodbc_mi-1.1.17.tar.gz
Algorithm Hash digest
SHA256 aad548ad2ad8bd9e7256d43d8f799574e826f9e199d613e7d3bec4f077d6caa4
MD5 feb6aa73633082159224062d71f800a1
BLAKE2b-256 5d1bcbac77ba4241ec7c585f50be3ac4529d32f2d3134f069733c2071c486a66

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17.tar.gz:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyodbc_mi-1.1.17-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 77.8 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

Hashes for pyodbc_mi-1.1.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8008991f4b0d0e408db180e694722e30a0ad0dad84462beabe23aa54257d556f
MD5 b12c569d84d090140faf1538cded9dc4
BLAKE2b-256 7cc696be3b2cc5dadfdc22478889d74284b16e4b7a4d0b7e5a733c10a9292c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cab4a20df0363046548d6a02efb977db50c449331a330cd26b68eecef1eb9060
MD5 ac9d0634a17a8078c785e761aa24caa0
BLAKE2b-256 fec341fdbfc9bb12ca830e7bc072d55fb930fa39f1ee39db88051bc412cce46a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 17f69dbdbc33b269d904340d24c6c03f8cfc0b83395ee8dd0a5093ec439a5e4b
MD5 8cea950ad66a67761ab0ef63365f6bb3
BLAKE2b-256 bced3b62234b1cc37a718e47f97894f593d6ad7fcba0834ddfe133a24540b0f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp313-cp313-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1041cc37a472831bbcf3a91ea3890c8a20290b6549f95a33e92d48d3bf39294f
MD5 8632e2e99772c92fe91b45125efffa21
BLAKE2b-256 f51291978afd3f4608f2d8718574456c5fd6332f9cec26f0379512cbc4ab353b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e85688274ca2f16dd9e132ef857b81cccddef8257569416d76d51506f2bd6eb1
MD5 4d5444d54373b81b11ce00ef3cab1cb1
BLAKE2b-256 5d5865317a244d2888406c482273e157343b1844bdc3030711ee63d599d2b287

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyodbc_mi-1.1.17-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 77.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

Hashes for pyodbc_mi-1.1.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 49423e507b1a4cc26f38ddd5b1bf48e6c3bbed5d9cc8dcddcfb0cc38294e03f5
MD5 9f9bc8b73feddf376b4d9977ac6c2754
BLAKE2b-256 8de780ba95bfd132b32d99d11861a47b78e34e31a102063ba425055507386426

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bcef50ea6b8207b9e927272b76f1684c06188614f308f337cd2a9d6aada87bd5
MD5 895cec15f8185ef2bbadb34f5b2c7054
BLAKE2b-256 2827f3a462d47d7228562149e9ff113123464b354e60aabdd62b924d1f59de3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 edea7b0714f8d974fd1af552e6eb588e8d67f8105c66d78d902975a8a0270748
MD5 fa65cf7e2856e05a4dd96ebcfb48640b
BLAKE2b-256 8be1cb43b3ff754d0de8b623dcc72147d22a7b38059a8821063e3d9c26ba5c53

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp312-cp312-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f2234a946a4b2903f16b5d22fa568726e7a3b32b253c3ae93599c3055961c377
MD5 77abaf42379ab1eae4396c3d224758d8
BLAKE2b-256 0a4684d56ad69ce3672f688cf9fb21b1d40ab70c363ef017883e32675561daf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b85afe1edecbebf79f05d06d1f0108775c42158394e8ddcaa200059d98dc52a9
MD5 d662151bcd62095b366fd59d78b4e980
BLAKE2b-256 85e6c076a248b16ef50a1ffe4fc0dd19fda8afe12f30fbc6508c2f8f21319c0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.17-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on dvicente-miatech/pyodbc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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