Skip to content

CLI | Home

ewolio edited this page Feb 21, 2020 · 14 revisions

All administration operations on the database or on the server configuration are performed with a Python 3 CLI.

Installation

  1. Go to [Installation Folder]/cli.
  2. Install the python dependencies with
python3 setup.py install

(Depending on your python environnment, this may have to be run as sudo.)

If this step does not work, go to the setup.py file and download the dependencies manually using pip3.

Usage

Interactive CLI

  1. Go to [Installation Folder]/cli.
  2. Start an interactive console for a server accessible at address:port with:
python3 cli_interactive.py [address:port]

(The default address is http://localhost:5050.)

  1. When you'll execute your first command, the CLI will prompt for username and password. The username correspond to the email of a user. By default, when the database is seeded, an administrator user is created. Its credentials are:
username: root
password: test

CLI Overview

The interactive CLI use IPython interpreter, meaning it benefit syntax highlight, autocompletion (with TAB) and fonction documentation (by typing the function name followed by ?).

Most of the CLI functionalities are provided through the python object: cli.

See the cli wiki for more information.

Using the cli library in custom scripts

Alternatively, you can import the module cli_api in your own script. See the cli_api wiki for more information.

Clone this wiki locally