1.3.5.2 Installing the Python Client

To install the Python client, you must ensure that your system meets the prerequisites mentioned in Prerequisites for Installing the Python Client.

You can execute the following steps to install and connect using the Python client:

  1. Download the Oracle Graph Client from Oracle Software Cloud.
    For example, oracle-graph-client-21.2.0.zip.
  2. Unzip the file into a directory of your choice.
  3. Install the client through pip.
    For example,
    pip3 install --user oracle-graph-client-21.2.0.zip
  4. Configure your client to trust the self-signed server certificate. See Configuring a Client to Trust the Self-Signed Certificate for more information.
  5. Start the shell by running one of the following commands:
    1. To connect to the PGX server instance located at https://localhost:7007 using base URL parameter:
      ./bin/opg4py --base_url https://localhost:7007

      You are prompted to enter your username and password.

    2. Alternatively, you can also connect to the PGX server instance located at https://localhost:7007 with username. For example :
      ./bin/opg4py --base_url https://localhost:7007 -u <graphuser>

      You will be prompted to enter your password.

    3. To start the client shell, and to avoid establishing a connection to any graph server:
      ./bin/opg4py --no_connect
    The Python shell starts as shown:
    Oracle Graph Server Shell 21.2.0
    >>>