CLI and CI/CD Automation
v1.2.0 - CLI and CI/CD Automation
CLI and CI/CD automation release
Command-line interface for shell scripting and pipeline integration (tested against NiFi 2.7.2)
Command-Line Interface
- Optional CLI install (
pip install nipyapi[cli]): Shell access to all nipyapi modules via Google Fire - JSON output by default with automatic CI platform detection (GitHub Actions, GitLab CI)
- Profile selection via
--profileflag or environment variables --versionflag and verbosity controls (-v,-vv,-vvv)
CI Operations Module (nipyapi.ci)
26 automation-focused commands for flow deployment pipelines:
verify_config,ensure_registry,deploy_flow,start_flow,stop_flowlist_flows,list_registry_flows,get_status,get_flow_versionscommit_flow,detach_flow,get_flow_diff,revert_flow,change_flow_versionconfigure_params,configure_inherited_params,export_parameters,upload_assetexport_flow_definition,import_flow_definition,cleanup,purge_flowfileslist_nars,upload_nar,delete_nar,resolve_git_ref
New Modules
- nipyapi.bulletins: Bulletin retrieval with filtering;
clear_all_bulletinsfor NiFi 2.7.0+ - nipyapi.extensions: NAR management, Python processor lifecycle, bundle version switching
- nipyapi.layout: Canvas positioning with
below(),fork(), automatic flow layout, grid alignment - nipyapi.nifi_registry: NiFi Registry operations extracted from versioning module
Canvas Module Enhancements
- FlowFile inspection:
list_flowfiles,get_flowfile_details,get_flowfile_content,peek_flowfiles - Component state:
get_processor_state,clear_processor_state,get_controller_state,clear_controller_state schedule_processornow supportsRUN_ONCEandDISABLEDstatesschedule_all_controllersnow waits for target stateget_processor_docs,get_controller_service_docsfor processor discoveryget_flow_componentsreturns connected subgraph for flow analysis
Parameters Module Enhancements
get_parameter_context_hierarchywithinclude_bindingsandinclude_parametersoptions
Utilities Enhancements
fs_writesupportsbinary=Truefor raw byte contentis_uuidfor UUID format detectionformat_timestampfor NiFi-compatible timestamps
Documentation
- CLI reference (
docs/cli.rst) - CI operations guide with examples (
docs/ci.rst) - NAR management guide (
docs/extensions.rst)
Infrastructure
- Updated NiFi and Registry API clients to 2.7.2
- New NiFi 2.7.2 API features: bulletin stack traces, listen ports, clear bulletins
- Simplified
revert_flow_ver()using VCI process_group_revision
Installation
pip install nipyapi==1.2.0
pip install "nipyapi[cli]==1.2.0" # With CLIRelated
- nipyapi-actions - GitHub Actions and GitLab CI examples
- Documentation
- PyPI