pyocient supports direct connections to Ocient systems in a command-line interface (CLI) as well as in Python programs that follow the Python Database API Specification 2.0. After you install pyocient, you can establish Ocient connections to run queries and commands.
Installation Tutorial
To install and run pyocient, follow these steps.Install pyocient
Install pyocient using pip:venv to install pyocient using a virtual environment. For more information, see the Python venv documentation.
Start pyocient
pyocient is started from the command line with a connection string. It includes many options to configure the connection and client similar to the JDBC driver. Learn more about supported options in the pyocient Manual. After installation, you can launch from a command line by typing the pyocient command:example_user) and password (example_password) with your credentials, and set your IP address. The connection example assumes a SQL Node exists at 10.10.1.1. The example uses the default port 4050, and is set up with default self-signed certificates for TLS.
Example Response:
quit; to exit the pyocient CLI interface.
Run a Query
In the pyocient CLI, you can run any SQL query supported by your database. In this example, a query is selecting rows from the system tables:The system cancels any queries made with the pyocient driver if you perform any of these actions:
- Fetch the entire result set.
- Close the connection.
- Execute a new query using the same connection.

