Nifi-Python-Api: A rich Apache NiFi Python Client SDK
- Three layers of Python support for working with Apache NiFi:
- High-level Demos and example scripts
- Mid-level Client SDK for typical complex tasks
- Low-level Client SDKs for the full API implementation of NiFi and selected sub-projects
- Functionality Highlights:
- Detailed documentation of the full SDK at all levels
- CRUD wrappers for common task areas like Processor Groups, Processors, Templates, Registry Clients, Registry Buckets, Registry Flows, etc.
- Convenience functions for inventory tasks, such as recursively retrieving the entire canvas, or a flat list of all Process Groups
- Support for scheduling and purging flows, controller services, and connections
- Support for fetching and updating Variable Registries
- Support for import/export of Versioned Flows from NiFi-Registry
- Docker Compose configurations for testing and deployment
- A scripted deployment of an interactive environment, and a secured configuration, for testing and demonstration purposes
Please see the issue register for more information on current development.
The easiest way to install NiPyApi is with pip:
# in bash pip install nipyapi
You can set the config for your endpoints in the central config file:
# in python import nipyapi nipyapi.config.nifi_config.host = 'http://localhost:8080/nifi-api' nipyapi.config.registry_config.host = 'http://localhost:18080/nifi-registry-api'
Then import a module and execute tasks:
You can use the Docker demos to create a secured interactive console showing many features:
from nipyapi.demo.secured_console import * from nipyapi.demo.console import *
You can also explore the scripts to get ideas for how NiPyAPi can be used to automate your environment.
Please check out the Contribution Guide if you are interested in contributing to the feature set.