Skip to main content

DRDA protocol database driver

Project description

This is a DRDA protocol (https://en.wikipedia.org/wiki/DRDA) database driver.

Requirements

  • Python 3.5+

Installation

$ pip install pydrda

Supported Databases

Db2

https://www.ibm.com/analytics/db2

Example

import drda

conn = drda.connect(host='serverhost', database='dbname', user='user', password='password', port=50000)
cur = conn.cursor()
cur.execute('select * from foo where name=?', ['alice'])
for r in cur.fetchall():
    print(r[0], r[1])

(with ssl connection)

import drda

conn = drda.connect(host='serverhost', database='dbname', use_ssl=True, user='user', password='password', port=50001)
cur = conn.cursor()
cur.execute('select * from foo where name=?', ['alice'])
for r in cur.fetchall():
    print(r[0], r[1])

Apache Derby

https://db.apache.org/derby/

You need to start derby as a network server. http://db.apache.org/derby/papers/DerbyTut/ns_intro.html#start_ns

Example

import drda

conn = drda.connect(host='serverhost', database='dbname', port=1527)
cur = conn.cursor()
cur.execute('select * from foo')
for r in cur.fetchall():
    print(r[0], r[1])

This driver can’t execute with parameters against Apache Derby.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pydrda, version 0.4.4
Filename, size File type Python version Upload date Hashes
Filename, size pydrda-0.4.4.tar.gz (13.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page