- Wrapper Class around ibm_db (IBM-DB2)
In IBM-DB2 after every read, the data needs to be fetched and after evey write, the data needs to be committed. But this class eliminates these requirements and make it simple to read and write to the database.
- Files:
ibmdb2/__init__.py
- Usage Examples:
import ibmdb2
db = ibmdb2.db(conn_str) ##-connect to the database using the connection string for example conn_str = “DATABASE=BLUDB; HOSTNAME=dashdb-txn-sbox-yp-dal09-04.services.dal.bluemix.net; PORT=50000; PROTOCOL=TCPIP; UID=username; PWD=password;”
Note: In the SQL statements all columns should be enclosed with “ double quotes and text be enclosed with ‘ single quotes.
db.read(‘select “column1”,”column2” from mytable where “column1” like 'myword' ‘) ##-returns column1 & 2 from table where column = myword
db.read(‘select “column” from table”, flat=False) ##-returns the raw read data
db.read(f’select “item” from table where “item” = '{Variable}'’) ##-read with string substitution
db.read1(‘sql statement’) ##-returns the first read data similar to fetchone
db.write(‘sql statement’) ##-writes the data and commits to the database
- For other connection commands use the connection class
db.conn….
Metadata
Release files for ibmdb2 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ibmdb2-0.3.tar.gz | 1.8 kB | Without provenance | Details for ibmdb2-0.3.tar.gz |
Release files / ibmdb2-0.3.tar.gz
| Download URL | ibmdb2-0.3.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d168fd9cf53bd87476d5f79ef52db01be6f41da32a61d461baf10d79490c650a
|
|
BLAKE2b-256 checksum How to use checksums |
a8130fefb91e2d1f32ef6f50d8074c2e2ac9869a2eaecf62ecc138c8f9d52946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for ibmdb2 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.