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.16.tar.gz (128.3 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.16-cp313-cp313-win_amd64.whl (77.8 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.16-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (387.0 kB view details)

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

pyodbc_mi-1.1.16-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (377.8 kB view details)

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

pyodbc_mi-1.1.16-cp312-cp312-win_amd64.whl (77.8 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.16-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (378.1 kB view details)

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

pyodbc_mi-1.1.16-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (368.9 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.16.tar.gz.

File metadata

  • Download URL: pyodbc_mi-1.1.16.tar.gz
  • Upload date:
  • Size: 128.3 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.16.tar.gz
Algorithm Hash digest
SHA256 2d1dcfdb7f0e2106879e5558505a4dbdfc96fbba145126ae6f4fad6ec990c22e
MD5 3c8117d0155c93523338a853eb424445
BLAKE2b-256 c2772ae0aa2434d966b831f8391476d0c5a8386d7831973b4be30ccb74fd3088

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyodbc_mi-1.1.16-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.16-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1ec3a1239aa39f677ea0147153eab904232f869a582902802ccd52ae30bb5931
MD5 dbebd3ec084f5c1fd89dc23ab606cbab
BLAKE2b-256 beb3b055a2942d5a6534dc84b38d10d28123a979beca5715ccdc9237b283283b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3ca6fdf73c8f9fdb5db87fa8c85f5cbf84f0a1d466e71d0c01ec05a1d61fef78
MD5 5e46b6731e29eacc2fcc5a7b88f989e7
BLAKE2b-256 5cb5e02a50b77fc21e91f27b6097648b0c60ecb1455fd7831f2f8d8b178bc3a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b78f8f056ae729503e9c721c0272deab42b59b439693a7c5ffa2affbfd5dea38
MD5 8d7f71e0b78ac7ca1117513813cc0544
BLAKE2b-256 19de5bdebe7bfece001314d485286c8d30867eeec745b1ea70a2cfdc1ff950be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 21ef61a1df7220225212e280b13352b47f30563d6448cc2710a9e89dd3bcdf5a
MD5 c1dbdb10c0821ad808f1a492adffa2df
BLAKE2b-256 7a2bc38021740ecc6078cf57e6b1fe80dd8a81cc2bedf8955c89f2033b9bf155

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5c12b8bb953a78e557122d29f98c13b6407ba5e6cabee15aef388d7da5545078
MD5 940f156918195e73f6151ea4619fd946
BLAKE2b-256 c004be7248542c7f010e82d9b05ebe69665bf7072f0d3c3cb32932de5e30f87d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyodbc_mi-1.1.16-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 77.8 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.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cec0f49e23b78aee9bf7c7a3d99fa8da269190e3c4f067427b87778fb043f26e
MD5 9222a7f80c14c6d99be9104d3e1b586c
BLAKE2b-256 b084230c094e528ab76bf32aeefce3732396b4159f9188435838ec89199aca01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9ff2d10102503cb688b9db0178a61d11f271059149f844e2ff4e578e18f3c192
MD5 67aa9431bd49f836d66746acf1fb346f
BLAKE2b-256 7e95e0d959df7494ecc29c08dd33dea70d96b28399571a2434908f88c75c6d7f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b39cd1238e13234d8b07a2003fd16a632e9f3eeae6abde1f2d7c5ea8a4a3332d
MD5 23d8a28a6b98a1bb0e8290859fb7c7a4
BLAKE2b-256 99b3524e885a172790181b4a05eb88edf9490cf42b21f0585d38672bb3ace5ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c62aff1bf09ad8d3eded39990bded1bf6eedefad12ac091abc36538c7bb155ee
MD5 5c2271f6170e37ab1a82378cb3ee2029
BLAKE2b-256 142a609f6c7b8cf9cb188400c288edef2d41c4ed0e32598ee0bcf073943cdfbe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.16-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 eb0b5aa06c20b2476e3ae8b0b9ffee0a1076716df506bffa239f3c2a88dfa00c
MD5 d5266c5a34e451aa60b5e3c7ec821ceb
BLAKE2b-256 1a2ed1de3e26470b6a078d80579d85c79631d31b27b4df6b371bd245833762ec

See more details on using hashes here.

Provenance

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