Installation

This section explains how to install the Saner Python SDK, upgrade it, and prepare a recommended development environment for reliable usage.

Requirements

Before installing the SDK, ensure your environment meets the following prerequisites:

RequirementVersion
Python3.9 or higher
pipLatest recommended
Operating SystemLinux, macOS, or Windows

The SDK depends on:

requests >= 2.32.4

This dependency is installed automatically during SDK installation, and pip/uv will refuse to resolve an older requests alongside it.


Install the SDK

Install the latest version using pip:

pip install secpod-saner-sdk

This installs the SDK and all required dependencies. The importable package name stays saner regardless of the install name. from saner import SanerClient works after either command below.


Upgrade the SDK

To upgrade to the newest available version:

pip install --upgrade secpod-saner-sdk

It is recommended to upgrade periodically to receive improvements, bug fixes, and new API support.


Recommended: Use a Virtual Environment

Using a virtual environment helps isolate dependencies and avoid version conflicts with other Python projects.

Create a virtual environment

Linux / macOS:

python3 -m venv venv

Windows:

python -m venv venv

Activate the virtual environment

Linux / macOS:

source venv/bin/activate

Windows (PowerShell):

venv\Scripts\Activate

Install the SDK inside the virtual environment

pip install secpod-saner-sdk

This ensures your Saner SDK setup remains clean and reproducible across environments.


OS-Specific Notes

Linux / macOS

  • If python3 isn't found after installing Python via your package manager, check that /usr/local/bin (or your package manager's bin directory) is on PATH.
  • Use python3/pip3 explicitly if your system also ships a Python 2 python/pip alias; running pip install secpod-saner-sdk against the wrong interpreter is the most common "installed but can't import it" report.
  • pipx is a good alternative to a manual venv if you're installing SDK-dependent CLI tooling rather than writing a library that imports saner directly; it isolates the install automatically without you managing activation.

Windows

  • Use python (not python3) for both venv creation and pip commands; the Python installer for Windows registers the python command, not python3.
  • Activating a venv in PowerShell (venv\Scripts\Activate.ps1) can fail with ... cannot be loaded because running scripts is disabled on this system if your execution policy blocks it. Fix it for the current user without changing system-wide policy:
    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
  • If pip install secpod-saner-sdk reports success but import saner fails in your editor/IDE, confirm your IDE's selected Python interpreter is the venv's, not a system-wide install; this is the most common cause on Windows when multiple Python versions are installed side by side.

Verifying the Installed Version Matches Your Python Version

The one-liner below confirms the SDK imported successfully and reports its version:

python -c "from saner._version import __version__; print('saner version:', __version__)"

If installed correctly, this prints the version string without errors. If it raises ModuleNotFoundError: No module named 'saner' instead, the interpreter running this command is not the one you installed the SDK into; this happens most often when a virtual environment exists but isn't activated, or when python/python3/pip/pip3 resolve to different interpreters on your system.

Confirm which interpreter and site-packages you're actually using alongside the version check:

python --version
python -c "import saner, sys; print(saner.__file__); print(sys.executable)"

sys.executable should point inside your virtual environment's directory (e.g. venv/bin/python or venv\Scripts\python.exe) if you're using one. If it points to a system Python instead, activate the venv (see "Activate the virtual environment" above) and re-run the install.


Dependency Conflict Troubleshooting

The SDK depends on requests>=2.32.4 and nothing else at runtime. In most environments this installs without conflict, but if another package in your project pins an older requests version, pip will report a resolution conflict at install time rather than silently installing an incompatible version.

Diagnose an existing environment:

pip show requests
pip check

pip show requests reports the currently installed version; pip check reports any unmet dependency constraints across your entire environment, not just the SDK's.

If you hit a conflict, the fix is almost always to either upgrade the other package to a version that accepts requests>=2.32.4, or (the more reliable option) give the SDK its own virtual environment (see above) so its dependency resolution never has to reconcile with an unrelated project's pins.


Installing for Platform-Only or CVEM-Only Usage

pip install secpod-saner-sdk always installs the complete package. There is no separate [platform]/[cvem] extra and no partial-install mechanism. Whether you use the platform-only, cvem-only, or universal client is an import-time choice, not an install-time one:

from saner.platform import PlatformClient  # platform resources only
from saner.cvem import CvemClient           # cvem resources only
from saner import SanerClient               # both, nested

See the "Client Types" guide for the full comparison and how to choose between them.


Did this page help you?