This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
In order to connect to oracle the following packages will need to be installed from conda. | |
cx_oracle | |
oracle-instantclient | |
libaio | |
""" | |
# Import the library needed | |
import cx_Oracle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To connect to mariadb you would need to conda install the mysql-connector-python package | |
conda install -c anaconda mysql-connector-python | |
""" | |
import mysql.connector as mariadb | |
import json | |
# Read the credentials from secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To start working with Neo4j you would need to pip install the package. | |
pip install neo4j | |
Documentation is located here: | |
https://neo4j.com/docs/api/python-driver/current/ | |
""" | |
from neo4j import GraphDatabase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To connect to mysql you would need to conda install the mysql-connector-python conda package | |
conda install -c anaconda mysql-connector-python | |
""" | |
import mysql.connector as mysql | |
import json | |
# Get credentials from kubernetes. The credentials were setup as a dictionary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Import the cassandra libraries that will be needed to connect to the cassandra cluster. | |
Note: Currently the cassandra-driver is only available for python 2.7 on conda-forge | |
Example install of package | |
conda install -c conda-forge cassandra-driver | |
""" | |
from cassandra.auth import PlainTextAuthProvider | |
from cassandra.cluster import Cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Import the ibm_db library | |
Will need to ensure that gcc is installed in the project environment as well. To do this will need to | |
go to the environment terminal and install gcc through yum using the following command. | |
sudo yum install gcc -y | |
After gcc installs you can install the pip package ibm_db using the following command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To install the vertica driver would need to install via conda | |
conda install -c conda-forge vertica-python | |
Import the vertica python library | |
""" | |
import vertica_python | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Connecting to Redis server | |
Install the pip package for python to use for connecting to Redis | |
pip install redis | |
""" | |
# Import the library | |
import redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To get started will have to install a few packages to get things running | |
# Download the release RPM from couchbase that sets up the couchbase repositories | |
wget http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-4-x86_64.rpm | |
# Install the RPM using yum | |
sudo yum localinstall couchbase-release-1.0-4-x86_64.rpm -y | |
# Install the needed packages required for the pip package install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
MLDB example using the pymldb library | |
Note: pymldb only works in python 2 | |
The pip packages you would need to install and use the are pymldb and tqdm | |
pip install pymldb tqdm | |
""" | |
# Import the library |