Chapter 1. Developing for Oracle NoSQL Database

Table of Contents

Installing the Driver
Using the Proxy Server
The nosqldb Python Module
Connecting to the Store
Connecting to a Secure Store
Automatically Starting the Proxy Server
The StoreConfig Class
The ProxyConfig Class
Working with a Secured Store
Configuring SSL
Setting the Security Properties for a Proxy Server

You access the data in the Oracle NoSQL Database KVStore using Python drivers that are provided for the product. In addition to the Python drivers, several other drivers are also available. They are:

  1. Java Table Driver

  2. Java Key/Value Driver

  3. C Table Driver

  4. C Key/Value Driver

  5. node.js Table Driver


New users should use one of the Table drivers unless they require a feature only available in the Key/Value API (such as Large Object support). The Key/Value API will no longer be enhanced in future releases of Oracle NoSQL Database.

The Java and C Key/Value driver provides access to store data using key/value pairs. All other drivers provide access using tables. Also, the Java Key/Value driver provides Large Object (LOB) support that as of this release does not appear in the other drivers. However, users of the Java Tables driver can access the LOB API, even though the LOB API is accessed using the Key/Value interface.

Users of the Table drivers are able to create and use secondary indexing. The Java and C Key/Value drivers do not provide this support.

To work, the C Table, Python Table, and node.js Table drivers require use of a proxy server which translates network activity between the driver and the Oracle NoSQL Database store. The proxy is written in Java, and can run on any machine that is network accessible by both your client code and the Oracle NoSQL Database store. However, for performance and security reasons, Oracle recommends that you run the proxy on the same local host as your driver, and that the proxy be used in a 1:1 configuration with your drivers (that is, each instance of the proxy should be used with just a single driver instance).

Regardless of the driver you decide to use, the provided classes and methods allow you to write data to the store, retrieve it, and delete it. You use these APIs to define consistency and durability guarantees. It is also possible to execute a sequence of store operations atomically so that all the operations succeed, or none of them do.

The rest of this book introduces the Python APIs that you use to access the store, and the concepts that go along with them.


The Python driver supports Python 2.6 and 2.7.

Installing the Driver

To install the nosqldb driver, as well as the required Java proxy server, use pip:

pip install nosqldb

The full nosqldb package source with examples and tests can be found at

The nosqldb driver depends on the Python Thrift package. Installation of the nosqldb driver using pip should resolve that dependency, but if necessary you can install Python Thrift yourself using:

pip install thrift