The official client for the Logichub API
Project description
lhclient
This utility connects to a deployment to
- Import scripts
- Import modules
- Import flow
- Create an Event Type from a CSV file
Parameters
All actions expect the following parameters
- origin: eg. https:///api
- username
- password (prompted interactively if missing)
The last argument is either a file or a directory. If a directory is provided, the script will apply the action to all the files in the directory with suffixes .json, .py, .sh, .csv.
Actions
Import a script
Uploads either a python or a bash script. If a script with the same name already exists, its contents are overwritten with the new contents (that's how the backend works, nothing specific to this script).
Syntax
python lhclient.py import script --origin https://<deployment_host>/api --username <username> <the py/sh file or folder>
Import a module
Imports a module from its JSON representation. If a module with the same ID already exists, it will fail with the DuplicateModuleIdException
exception.
Syntax
python lhclient.py import module --origin https://<deployment_host>/api --username <username> <the json file or folder>
Import a flow
Imports a flow from its JSON representation. We are currently using the legacy API, so import will fail if a flow with the same name already exists.
Syntax
python lhclient.py import flow --origin https://<deployment_host>/api --username <username> <the json file or folder>
Create Event Type from CSV
Uploads a CSV file, creates a new FileConnection (named as the file, without the extension) and creates a new EventType (named as the file, without the extension as well). If the CSV file already exists, its contents will NOT be overwritten on the server. If an EventType already has the name of the filename, the creation will fail (we can't have two EventTypes with the same name).
You can optionally use the --name argument to specify the name to use for both the FileConnection and the EventType
Syntax
python lhclient.py create event-type from-csv --origin https://<deployment_host>/api --username <username> <the csv file or folder>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lhclient-0.1.14.tar.gz
.
File metadata
- Download URL: lhclient-0.1.14.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.8 CPython/2.7.15 Darwin/17.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81deccbdc420c7a5c981726d08067a25fdbf130754410e4496cf8b0d6cd48f83 |
|
MD5 | 071424ebf1bce853c7dea48e51bf0d99 |
|
BLAKE2b-256 | 059d5fc5acba12caff417b7270cbe713970e5e0d7f2fd30b5844d901556c4623 |
File details
Details for the file lhclient-0.1.14-py2.py3-none-any.whl
.
File metadata
- Download URL: lhclient-0.1.14-py2.py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.8 CPython/2.7.15 Darwin/17.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ffe123ebda6ea02a696f7650589cee67e4d156728b530822773e7e02b0986e4 |
|
MD5 | 2b24be553565a3ced268c3200b22442a |
|
BLAKE2b-256 | 7b04367b967acbed969709ec90998349e5d9a8cfc17d60dfe56f354482475db8 |