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.14.tar.gz (126.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.14-cp313-cp313-win_amd64.whl (76.6 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.14-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (384.1 kB view details)

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

pyodbc_mi-1.1.14-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (375.8 kB view details)

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

pyodbc_mi-1.1.14-cp312-cp312-win_amd64.whl (76.6 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.14-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (374.2 kB view details)

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

pyodbc_mi-1.1.14-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (366.1 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.14.tar.gz.

File metadata

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

File hashes

Hashes for pyodbc_mi-1.1.14.tar.gz
Algorithm Hash digest
SHA256 784d1a297646fc7146a07c9518a92e8a63839c99dbb9bd32e49469ab78e3955e
MD5 3f61c716381484d48dcb933f8ec5fa48
BLAKE2b-256 fd63b22e6bfedd3dbe91138d27dc27dd29a05065e14306926aef74791e9e964c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyodbc_mi-1.1.14-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 76.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyodbc_mi-1.1.14-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6e29a726eaa562308664cc2057b78c7fc567d478e840ae624e32eae85e5e8b83
MD5 f16e078a1ca109c3807e8628b414c70c
BLAKE2b-256 6754193dad122c63407d68118097cf2f3fcdde51d6897ed78c61ac4cd7247278

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7771270ee1e82e0e90182773d3a79029c7cc67da5eb7ebd2009f85437ca37db3
MD5 8586e2a15fe8557eeea264b6ff3bc9b7
BLAKE2b-256 78cf626f424ceaa4b66f6a6ff79a09680d23086935a264a068ffd652c6f3d160

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3e924789fc4343c62a8fba2d9525f8d251db6a069083a8450dd4aca77417b0be
MD5 f47bee944bfbec61b10ebe86c7c45b90
BLAKE2b-256 7a9ef637f9d698f2a95ade88ad839663eb590577d05bd28f477a8a97feb4f0c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 102ce874b3866a245d033f0803ad323a544df35c51639a130ac9e09d0749fc30
MD5 1f0e74b9ea372890a5de1c1ffa36313a
BLAKE2b-256 84c9bde18f279985352b942d55cb183ba1dbc3cf20abab35232206985ac5d058

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5fc8b35c44f5e2cc55475ab10b8123c7d341f58035a3eac1146150a2b26fee08
MD5 00c8ec9b4a3302287e84308bc71b5c5b
BLAKE2b-256 4165519f85593d6ea9c4c7885317ee91fe4a0063ee7a345320cf56445f1d13c4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyodbc_mi-1.1.14-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 76.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyodbc_mi-1.1.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cce97fe182b061c30e710061d418aeadc114a3fc639984053108114c66a07996
MD5 a1dadaca1176492b11c138c221682f4d
BLAKE2b-256 a54d42721498083acd79840f2ffbfb3e174bc05b9801ad90ebef1b2c9822e1a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9606fc5868fb732818c38f3ca31e0a3044ee661332c2f3115193c8f1f284b02e
MD5 0659cc333d699f7ee82cc45eefd9be65
BLAKE2b-256 517786ae592a9a6bf53e329249c04f91b9b9457e6d7d7427c2e0758345a0c601

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e02976d4f7a652a0532fa3528a4548eb696150341262c45c8e6bc67960e47d92
MD5 bf21d576c94cc36768dedcf8d6a0fc59
BLAKE2b-256 8c8ae0083be98f21b7b2976d6d5d5ebf083950d2b7c557855dd6e7e5037d2fbd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f554bbece5a33acab1f8927e21fa74422718aa25022c1cd549b30dc8198bc37
MD5 c01c591bda24f552860355d5bf8bcdd8
BLAKE2b-256 c9ad507108db15d3656579da68686544527b41bb6562077dc71752d10fc7aa47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.14-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b006f4c54787d9493b27ea9c9119b98c1eb99d2a61e0f40a0506a9236b3db7ac
MD5 a851c2f03581150562990b9cb68cf940
BLAKE2b-256 306d7d8db4b1e24f6760b56ccd7dbc1423323f385ff4ff68d560c8dd558b34d6

See more details on using hashes here.

Provenance

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