Installation
Requirements
Python: 3.9 or higher
Apache NiFi: 2.0.0 or higher (for target NiFi instances)
Apache NiFi Registry: 2.0.0 or higher (optional, for local versioning features)
Docker Desktop: Optional, for local development and testing with provided profiles
Stable Release
To install NiPyAPI from PyPI, run this command in your terminal:
$ pip install nipyapi
This is the preferred method to install NiPyAPI, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
Virtual Environment (Recommended)
It’s recommended to install NiPyAPI in a virtual environment to avoid conflicts:
$ python -m venv nipyapi-env
$ source nipyapi-env/bin/activate # On Windows: nipyapi-env\Scripts\activate
$ pip install nipyapi
Development Installation
To install NiPyAPI for development or to get the latest features:
# Clone the repository
$ git clone https://github.com/Chaffelson/nipyapi.git
$ cd nipyapi
# Install in development mode with all dependencies
$ pip install -e ".[dev,docs]"
Or to get the latest development version directly:
$ pip install git+https://github.com/Chaffelson/nipyapi.git@main
From Source Archive
You can download and install from a source archive:
# Download the latest source
$ curl -OL https://github.com/Chaffelson/nipyapi/tarball/main
$ tar -xzf main
$ cd Chaffelson-nipyapi-*
# Install using pip (recommended)
$ pip install .
# Or build and install manually
$ python -m build
$ pip install dist/*.whl
Verify Installation
To verify that NiPyAPI is installed correctly:
$ python -c "import nipyapi; print(f'NiPyAPI {nipyapi.__version__} installed successfully')"
Next Steps
Option 1: Quick Test with Docker (Recommended for New Users)
If you have Docker Desktop, you can test with our provided environment:
# Clone repository for Docker profiles
$ git clone https://github.com/Chaffelson/nipyapi.git
$ cd nipyapi
# Start test environment
$ make certs && make up NIPYAPI_PROFILE=single-user && make wait-ready NIPYAPI_PROFILE=single-user
Then test the connection:
import nipyapi
# Use built-in profile (no manual configuration needed)
nipyapi.profiles.switch('single-user')
# Test connection
try:
version = nipyapi.system.get_nifi_version_info()
print(f"✓ Connected to NiFi {version}")
except Exception as e:
print(f"✗ Connection failed: {e}")
Option 2: Connect to Your Existing NiFi
For connecting to your own NiFi instances, see:
Environment Profiles:
docs/profiles.rst- Centralized configuration managementAuthentication Methods:
docs/security.rst- All supported authentication optionsMigration Guide:
docs/migration.rst- Upgrading from NiPyAPI 0.xQuick Start:
README.rst- Step-by-step setup instructions
Dependencies
NiPyAPI automatically manages its dependencies during installation. Here are the complete dependency details, automatically generated from the actual project dependency files.
Runtime Dependencies
These dependencies are automatically installed when you install NiPyAPI:
Core HTTP Stack:
certifi>=2023.7.22- SSL certificate verificationpysocks>=1.7.1- SOCKS proxy supportrequests>=2.18- Primary HTTP client for API communicationurllib3>=1.26,<3- HTTP client backend and connection pooling
Utilities:
PyYAML>=6.0- YAML file processing and serializationpackaging>=17.1- Version comparison utilities
Build & Packaging:
setuptools>=38.5- Package management and distribution
Optional Dependencies
Development Dependencies (install with pip install nipyapi[dev]):
codecov>=2.1.13- Coverage reporting service integrationcoverage>=7.0- Coverage analysis and reportingdeepdiff>=3.3.0- Deep data structure comparison for testingflake8>=3.6.0- Code style and syntax checkingpre-commit>=3.0.0- Development toolpylint>=3.3.0- Advanced code analysis and lintingpytest-cov>=5.0.0- Test coverage measurementpytest>=8.4- Testing frameworktwine>=6.0.0- Package distribution to PyPI
Documentation Dependencies (install with pip install nipyapi[docs]):
Sphinx>=7.4.0- Documentation generation frameworksphinx_rtd_theme>=3.0.0- Read the Docs theme for Sphinxsphinxcontrib-jquery>=4.1- jQuery support for Sphinx themes
Dependency Management
Automatic Installation: All runtime dependencies are automatically installed when you install NiPyAPI via pip.
Version Constraints: NiPyAPI specifies minimum versions for compatibility but allows newer versions unless there are known incompatibilities.
Development Setup: For a complete development environment with all optional dependencies:
$ pip install -e ".[dev,docs]"
Minimal Installation: NiPyAPI requires only 7 runtime dependencies for basic functionality.
Note
This dependency information is automatically generated from the project’s
requirements.txt and pyproject.toml files during documentation build.