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.15.tar.gz (126.2 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.15-cp313-cp313-win_amd64.whl (75.8 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.15-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (383.6 kB view details)

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

pyodbc_mi-1.1.15-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (374.7 kB view details)

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

pyodbc_mi-1.1.15-cp312-cp312-win_amd64.whl (75.8 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pyodbc_mi-1.1.15-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (373.5 kB view details)

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

pyodbc_mi-1.1.15-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (364.7 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.15.tar.gz.

File metadata

  • Download URL: pyodbc_mi-1.1.15.tar.gz
  • Upload date:
  • Size: 126.2 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.15.tar.gz
Algorithm Hash digest
SHA256 0169dc0e1e6438bcb194ab3bc13825daa1af446b27b9dd4e51a0f28420910ad4
MD5 2aa491724045706f3640421eef6b3ff1
BLAKE2b-256 b1b6a59bd397bf19ca8114bdb751119237684e1295ee33d822f3cb028d53ac20

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyodbc_mi-1.1.15-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 75.8 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.15-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 aef771929b1fb6f70f1dff9e975d7ff73182f1a9cc2f282a3ddc747edd988de0
MD5 c11ed4cc7630d65a4cd06ffd7d8e65a0
BLAKE2b-256 b9477e87b25a56d001d65091087becaf431fd477d826257bfe141f4c1238516d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 17be5537e794681ba400137a3edea20e513c350c234e1e99609dcbc0c54fe820
MD5 4167366db988c566b34f3c93f0c6d9eb
BLAKE2b-256 fdadd6392a7f64169e901fc452ede7f193d0235bdb6f35d7d710d6314edaeed2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 8e412b7f06dd2aadbf3f3617db1282cce5c084bbb62d6d299061cc23d89115a3
MD5 924b57ec2f87ee184e1367b970743f6f
BLAKE2b-256 f41d141f2d40196160f68c895a7ef588eb2c0ded34a70e0bdb65298030440f8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 efe65862ec13dc75c190ae6f60ed47310c56f43f58edffb4a107754284e2ec8e
MD5 080e3e7e200de4288a0c8e20b7d4a9d5
BLAKE2b-256 3a52ea0d523e67c535b9ed36ce8230f4b2c1bd218edd912308386cb924e9c3e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 73e144fdf43d1665661c96f4cecd4aa18524ac5803c728a63e8342b4b9597947
MD5 9f72ca607f091b44aa4986bc8e677f54
BLAKE2b-256 add26fcf154750d95de7b305c47dc2dc9f7cc3d801809a8a975224d525469d8b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyodbc_mi-1.1.15-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 75.8 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.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f268938aa19220560f1a1b5a3bf3a1f69598dc36c6f4d8de63bbf1e9ae8a838a
MD5 18a490e88c9529ce1ff4e2d18cd16416
BLAKE2b-256 36d992d7dd3d3448607918cf9b9dab59401df367a0109eab76eff8d9ca9d0d54

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f082dad61535eb1353fbb50681c810bfc2885386c098034d76fe893e78657cbd
MD5 cd99d432133f45deec73a3d9d7b73650
BLAKE2b-256 27ee4b6ca7efc09c5ecbc84d7c5b7efd8913a0748895c20e5dedaa8002cac1aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 66514ba8d245330a80d3299bb313008f743647aea86ff5c3fbc6461878523382
MD5 8142bddbdd43225d9055bd890c529480
BLAKE2b-256 eb73684159401025bc6bbb4d82cf156f7023af7e2be19f761aca8148f290ba57

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8fe9043552b540e50f31b1342a06928914ff7c7a841782921ae57d98803390db
MD5 9a0bb864af7739a4bebe63016033fac7
BLAKE2b-256 eb79ae368738b0002474be3ba04f5b12463e271d0b1ac9712308a000dc4622f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyodbc_mi-1.1.15-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4c701b32f50b919b7a7518d08817d1afca4c8eb4d43a10290991333351a9ddda
MD5 a59049178855449fcfb517903135b421
BLAKE2b-256 58d9756e71589f88cab5c33515bb52f067423bc9bc4a5e3e278ed16b37d13d18

See more details on using hashes here.

Provenance

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