zoql — accepts Zuora object query language queries (both zoql and export zoql are accepted) and displays results in terminal or in excel.
| zoql [-u|--user] [--excel] [--sandbox]
Presents a prompt ("zoql>"), and waits for valid Zuora zoql queries. Queries may be on multiple lines; they are terminated either by a trailing semicolon or by a blank line of entry.
zoql terminates when it encounters EOF (ctrl-D) or the single character "q" on a line.
zoql supports readline movement commands.
If export zoql is detected, zoql creates, retrieves, deletes, and displays an export file.
See the references below for links to documentation of Zoql at the Zuora knowledge site.
-u, --user
: the username; if this is supplied, zoql will request the password using getpass()
--sandbox
: use the Zuora apisandbox, rather than the production instance
--excel
: use xlwings to transfer the query results to Excel, rather than displaying in the terminal
If the --user option is not given, credentials are obtained from ~/.zuora-production-config.json or (if you add the argument --sandbox) from ~/.zuora-sandbox-config.json.
~/.zuora-production-config.json
: user name and credentials for Zuora production instance
~/.zuora-sandbox-config.json
: user name and credentials for Zuora sandbox instance
The file format is json:
{
"user": "[email protected]",
"password": "mypassword"
}
pip install --process-dependency-links git+git://github.com/bolaurent/python-cmdline-zoql.git
See GitHub Issues: https://github.com/bolaurent/python-cmdline-zoql/issues
Bo Laurent [email protected]
Many thanks to Distributing a Python command line application