Oracle instant client binaries to be used together with cx_Oracle.
Project description
PyOracleClient ![](https://pypi-camo.freetls.fastly.net/59ecf4c8e6ec054bcd6aff69ea17b7e687403e84/68747470733a2f2f6769746875622e636f6d2f4c7563614d696e676172656c6c692f50794f7261636c65436c69656e742f7261772f6d61737465722f70796f7261636c65636c69656e742f7265732f69636f6e2e706e67)
About
This package contains an Oracle Instant Client's binaries,
necessary to connect to Oracle databases with cx_Oracle
.
Installation
You can install with pip as:
pip install pyoracleclient
Example
You can add tns names via the pyoracleclient.add_tns
function as shown below.
import pyoracleclient as pyoc
pyoc._delete_all_tns()
pyoc.add_tns(name='FSSDB', service_name='servicename.prd.tns',
protocol1='TCP', host1='host1address', port1=1000,
protocol2='TCP', host2='host1address', port2=1000)
Alternatively you can append your own tns specification as a string as follows:
import pyoracleclient as pyoc
pyoc.add_custom_tns("""yourtnsname = (DESCRIPTION=
(ADDRESS_LIST=(FAILOVER=ON)
(LOAD_BALANCE = OFF)
(ADDRESS=(PROTOCOL=TCP)
(HOST=host1address)
(PORT=1000))
(ADDRESS=(PROTOCOL=TCP)
(HOST=host1address)
(PORT=1000)))
(CONNECT_DATA=(SERVER=dedicated)
(SERVICE_NAME=servicename.prd.tns)))
""")
Finally, you can also fill the tnsnames.ora
file manually.
Its location can be found in the variable pyoracleclient._TNSORA_PATH
.
Author
Luca Mingarelli, 2020
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
PyOracleClient-0.0.5.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for PyOracleClient-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed2cfac158b0417617779b60749dd56f0979706b4515fe1b1adc1f2b609dd017 |
|
MD5 | 6aa7a24358ecdd32d172266f4c838c18 |
|
BLAKE2b-256 | 9271f1873947862b8dae8278955a4b95f2bd8c1bb57c966011e403c5253e5480 |