Please refer to the full Python documentation for more details.
If you haven’t installed the Python client, refer to the installation instructions.
The Python package is called
rockset and the entire API is contained within a single Python module called
rockset. APIs defined in the
rockset module allow you to:
If you have already configured your credentials in the command line, you can create a
Client without any options and the current active credential profile will be used (please refer to the
rock CLI documentation for more information):
from rockset import Client, Q, F rs = Client()
You can also provide an API key and server when initializing the
Client object as follows:
Alternatively, you can specify a credentials profile that was previously created in the command line:
The two most commonly used part of Rockset’s Python Client are:
Client: Used to connect securely to Rockset.
F: Used to build powerful and complex Rockset queries using Python expressions.
The following example is a Python program to select all documents from collection
hello_world that have a field called
name whose value is equal to the string
System-wide limits such as the biggest documents that can be added to a collection or other limits relating to field sizes can be obtained from constants that are present within the library.