Skip to main content

Extra Methods for Working with ODBC Connections in Python

Project description

pyodbc-extras

Extra Methods for Working with ODBC Connections in Python

install

pip install pyodbc-extras

usage

from pyodbc import connect

from pyodbc_extras import dump_sql_to_rows, dump_table

cnxn = pyodbc.connect(CONNECTION_STRING)
cursor = cnxn.cursor()

# dump custom sql
dump_sql_to_rows(cursor, "SELECT * FROM cars WHERE year < 2015")
{ "column_names": ["year", "make", "model", ...], "rows": [{"year": 2005, "make": "Audi", "model": "A3"}, ...] }

# same as dump_sql_to_rows(cursor, "SELECT * FROM cars") 
rows = dump_table(cursor, "cars")

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_extras-0.0.0.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file pyodbc_extras-0.0.0.tar.gz.

File metadata

  • Download URL: pyodbc_extras-0.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pyodbc_extras-0.0.0.tar.gz
Algorithm Hash digest
SHA256 adef92a45362efb85443b4a726390a1331ee3861ee41550e1dd2e5bb69351245
MD5 f25deecaf349b29e86cbfbecf02feb21
BLAKE2b-256 cb4b6eb70f20bf5b5d129bc5c0dc1b7fd557fbfb016b8f2ee3a35dc82746d215

See more details on using hashes here.

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