Skip to main content

PyOracleClient

CircleCI version PyPI Latest Release License Downloads Buy Me A Coffee

About

This package provides access to 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

After installation you want to download the oracle instant client: you can do this via the following:

import pyoracleclient as pyoc

pyoc.get_client(version='19.3.0.0.0', sys='linux', url=None)

By default version 19.3 for linux 64bits is downloaded. To obtain a client for a different system provide the corresponding url instead. Visit 'https://www.oracle.com/database/technologies/instant-client/downloads.html', choose your version, and copy the download link. For example for version 19.3.0.0.0 linux 64b, this will be in the form: https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basic-linux.x64-19.3.0.0.0dbru.zip.

You can now 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

You find this work useful? Buy Me A Coffee

Python

Metadata

Release files for PyOracleClient 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyOracleClient 0.2.6
File Size Uploaded
PyOracleClient-0.2.6.tar.gz 111.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyOracleClient 0.2.6
File Interpreter ABI Platform
PyOracleClient-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 221.9 kB

Release files / PyOracleClient-0.2.6.tar.gz

Download URL PyOracleClient-0.2.6.tar.gz
Size 111.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b70e10ff15f043519cd1763629981bc6f538d0ce5fd88aa82072ca1c474933b3
BLAKE2b-256 checksum
How to use checksums
dacd53043a2f6184a5f0d2a562a4f74edefd59a3314434cebaab0907b11e2e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / PyOracleClient-0.2.6-py3-none-any.whl

Download URL PyOracleClient-0.2.6-py3-none-any.whl
Size 110.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3061344abd887511bbf757148ce83d2d0723b554a0b340d99d4713df4c5550ce
BLAKE2b-256 checksum
How to use checksums
779e17702946596718caa50174dd872e60e24dd068f899b16cf662ec676b5a04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.1.40

2 release files

0.0.16

2 release files

0.0.5

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page