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.18.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.18-cp313-cp313-win_amd64.whl (77.8 kB view details)

Uploaded CPython 3.13Windows x86-64

pyodbc_mi-1.1.18-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.18-cp313-cp313-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.18-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.18-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.18-cp312-cp312-win_amd64.whl (77.7 kB view details)

Uploaded CPython 3.12Windows x86-64

pyodbc_mi-1.1.18-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.18-cp312-cp312-musllinux_1_2_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.18-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.18-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.18.tar.gz.

File metadata

  • Download URL: pyodbc_mi-1.1.18.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.18.tar.gz
Algorithm Hash digest
SHA256 94ec1d1d590ce1ec6e39c62237ec55ee1c2426da9b29365873f9eb28bb942190
MD5 4a9b24d2e45d908ee1b90d794cee7132
BLAKE2b-256 3b2746bc8f5e61751a99a23184855a78ceb4a58661d96c18d061d0c49a0b2c65

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18.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.18-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyodbc_mi-1.1.18-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.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b1ece418453f193ebc81103b7d6dd20987aaa45ef81d12f782e07c2e2e7960a4
MD5 e17af27c2e89e2ee3d316742af794aba
BLAKE2b-256 e1d777ccc577b506dc09c96947b61af1b79f48840b21b63f749adb58b546f532

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a7db240443f297bf796494ee6715d64df3abb683d8c23bb364c3e85cfb6c403d
MD5 bec566d313ebf26f7f6143c97a68a473
BLAKE2b-256 f2b30e8c1824445379f3a61ce034b1d5baffe5dfd9ff95f7d8816f617588c904

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c4fe4648b21c0eeaada97107b81fd791ae3bf7565668039cf1693aa6d8f1d273
MD5 20a988655f8e6a4cc4bf895fa5bedd9a
BLAKE2b-256 22e40462c1de795024a4c50bf6c27ac12bba2c0decf8f965eacadeb594bdc24f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd13603dcd40d6a73defc71089c3250475d2f0e78a02c19d06c7ecfea3b26510
MD5 a70c73933243c9d5b3d07fe74d66ba5b
BLAKE2b-256 ed4d5d80915f5dace2f651f9f02f982e9b0a0b194e6ddd510b458cf66588ee0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 baabfc181c1b0ee0b9a2e43d4dc780e8c3d48d65af8f7372760d5386adc64524
MD5 f42c1b008687ce4c883584cc76b578d4
BLAKE2b-256 8020a728070c94a25dfafd847155413d8db74538ec874c64b17244005f1d8320

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyodbc_mi-1.1.18-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.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b9c9d7e0a69a859be33eec368e1ab3c3e506c3753f14858deea8a7acc46457b5
MD5 5ace777054f621b3d324db65821ada7a
BLAKE2b-256 b9e2321f1a2109ea55f8f1d5c751391a1c5eb680a7072710be66107563c9a5eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 19da7a95349b5836f69da3c2bf9f1879317102b909b35f7b8686a119e9f023c7
MD5 d6386680a25dd4c0082830c945d0bf94
BLAKE2b-256 a1fae1c409ca31874a508f8cd5d4412223e9396c75bd25077b631849d046e9c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 fc5bdc7efa398778ab04198de8420b6b70e52a75a1d9fa65c819809b151d7180
MD5 3fcf2547536c5a994481c7f6093618ae
BLAKE2b-256 64bcc5b897e04860e2b9d0f30860d011679c037da1994c7fe729280f1592e933

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e04b8f75e49e8a91accfcbee6e915ac1fa736b2003ca92c84bda35120360459
MD5 a0465bee97000bde23cb1b7f7146d562
BLAKE2b-256 8e18ee3ce169f472114fb7d5b7bee48a3d81344bbc45017fb2a7a5f15d4b2c2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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.18-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyodbc_mi-1.1.18-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 90ced26899e4d4cee8d19fb465b6cfb9cc597372ba46ec316e162a59087859cd
MD5 876cef0a1f3198d1e3d7c75cf530d6b9
BLAKE2b-256 d055a9ff57182966290c74f6caf7e3199fe43bce80ee316bd1482260d2b56126

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyodbc_mi-1.1.18-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