Skip to main content

Wrapper Class around cx_Oracle for Oracle Autonomous Database

Project description

Wrapper Class around cx_Oracle for Oracle Autonomous Database

This class supports multiple connections to the database using session pool. The minimum and maximum number of sessions can be defined.

In cx_Oracle after connecting to the database, for every query statement the data needs to be fetched and for evey update or insert statement the data needs to be committed. But this class eliminates these requirements and make it simple to read and write to the database.

Files:
palora/__init__.py
Installation:
sudo pip3 install palora
Usage Examples:

import palora

db = palora.db(‘user’, ‘password’, ‘tsn-entry’) ##-connect to the database

db.read(“sql statement”) ##-returns the read data from database with flat=True

db.read(“select item from table”, flat=False) ##-returns the raw read data

db.read(“select item from table where item = %s”, (sub1,)) ##-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

db.clear() #-to reconnect if any transaction error

For other cx_Oracle connection commands use the connection class
db.conn….

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 palora, version 3.1
Filename, size File type Python version Upload date Hashes
Filename, size palora-3.1.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page