Python Introduction
Opal Python client, a command line scripting tool (see Python Commands) and an API (see Python API) written in Python, enables automation of tasks in a Opal server.
Requirements
Python 3.7+ must be installed on the system. See more about Python.
Installation
The Opal Python Client is available on the official Python Package Index.
sudo pip install obiba-opal
Note
Previous versions were available as system packages. Make sure to remove them before installing the package with pip.
# on Debian systems
sudo apt-get remove opal-python-client
# on RPM systems
sudo yum remove opal-python-client
Usage
To get the options of the command line:
opal --help
This command will display which sub-commands are available. Further, given a subcommand obtained from command above, its help message can be displayed via:
opal <subcommand> --help
This command will display available subcommands.
Upgrade Notes
Since version 6.0.0, the command line options have slightly changed. The new syntax for multiple values is to repeat the option for each value instead of providing a list of values.
For example, the new syntax for multiple tables is:
opal <subcommand> --tables TABLE01 --tables TABLE02
instead of:
opal <subcommand> --tables TABLE01 TABLE02
For backward compatibility, the old syntax is still supported with the alternative command opal-legacy:
opal-legacy <subcommand> --tables TABLE01 TABLE02