Skip to main content

Njinn CLI

Project description

Njinn CLI & Client


You can install the Njinn CLI from PyPI:

pip install njinn

The client is supported on Python 3.7 and above.

Njinn CLI Usage

  • Pack install

    njinn pack install <repository_url>

Use --help to see available options and defaults.

Njinn Client Usage

  • The client allows interacting with Njinn via its REST API.
  • To see available query string parameters, please refer to official Njinn Documentation.


api = NjinnAPI(host="", token="*****")

# GET /workflows

# GET /workflows/1

# POST /workflows
api.create(Workflow(title="Workflow 1"))

# PUT /workflows/1

# DELETE /workflows/1

Get execution state

# GET /executions/1
execution = api.executions(1)

Get running executions

### GET /executions?workflow=1&state=RUNNING
executions = api.executions(workflow=1, state="RUNNING")

Add a label to execution

# Option 1:
# GET /executions/1
execution = api.executions(1)
execution.labels["my_label"] = "new"

# PATCH /executions/1 {...}"labels")

Cancel execution

# GET /executions/1
execution = api.executions(1)

# POST /executions/1/cancel {...}

Run Workflow

# GET /workflows/1
workflow= api.workflows(1)

# POST /workflows/1/run {...}

Create webhook

# POST /hooks {...}
api.create(Webhook(name="W1", title="W1", workflow=1))

Disable webhook

# PUT /hooks/1 {...}
webhook = api.hooks(1)
webhook.is_active = False

Delete webhook

# DELETE /hooks/1

Create config

# POST /configs {...}
api.create(Config(name="W1", title="W1", values={"key1": "value1"}))

Update config

config = api.configs(1)
config.values["key1"] = "value1"

# PUT /configs {...}

Get execution log

# GET /executions/1
execution = api.executions(1)

# GET /executions/1/log

Get task result

# GET /executions/1/tasks/task_1/result
result = api.executions(1).tasks("task_1").result()

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

njinn-0.2.1.tar.gz (12.0 kB view hashes)

Uploaded source

Built Distribution

njinn-0.2.1-py3-none-any.whl (16.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page