nifi_deploy package

nifi_deploy.nifi module

Provides a NifiInstance class facilitating easy to use methods utilizing the NiPyApi (https://github.com/Chaffelson/nipyapi) wrapper library.

class nifi_deploy.nifi.NifiInstance(url=None, username=None, password=None, verify_ssl=False)[source]

The NifiInstance class facilitating easy to use methods utilizing the NiPyApi (https://github.com/Chaffelson/nipyapi) wrapper library.

Parameters:
  • url (str) – Nifi host url, defaults to environment variable NIFI_HOST.
  • username (str) – Nifi username, defaults to environment variable NIFI_USERNAME.
  • password (str) – Nifi password, defaults to environment variable NIFI_PASSWORD.
  • verify_ssl (bool) – Whether to verify SSL connection - UNUSED as of now.
create_template(pg_id, name, desc='')[source]

Create a template from process group id.

Parameters:
  • pg_id (str) – Process group ID to create the template from.
  • name (str) – Name of the template to create.
  • desc (str) – Optional, description of the template to create.
Returns:

nipyapi.nifi.TemplateEntity

delete_template(template_id)[source]

Delete a template from Nifi template registry.

Parameters:template_id (str) – ID of the template to delete.
Returns:None
export_template(template_id, file_path=None)[source]

Export a template as XML, and optionally write it to a file or stdout.

Parameters:
  • template_id (str) – ID of the template to export.
  • file_path (str) – Optional, path of file to write the XML to.
Returns:

String (template xml)

import_template(file_path)[source]

Imports a template XML into Nifi’s template store.

Parameters:file_path (str) – Path of the XML file to import into Nifi as a template.
Returns:None

nifi_deploy.nifi_deploy module

This file is used for the CLI tool. By default setup.py links nifi-deploy as an executable to this file.

nifi_deploy.nifi_deploy.cli()[source]
nifi_deploy.nifi_deploy.export_function(args)[source]
nifi_deploy.nifi_deploy.import_function(args)[source]