SSPI API bindings for Python
Maintained. Last release 3 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install sspilibPython SSPI Library
This library provides Python functions that wraps the Windows SSPI API.
It is designed to be both a high and low level interface that other libraries can easily leverage to use with SSPI integration.
The high level interface is under the sspilib namespace whereas the low-level interface is under the sspilib.raw interface.
Requirements
- Python 3.10+
More requirements are needed to compile the code from scratch but this library is shipped as a wheel so it isn't mandatory for installation.
Installation
Simply run:
pip install sspilib
To install from source run the following:
git clone https://github.com/jborean93/sspilib.git
python -m pip install build
python -m build
pip install dist/sspilib-*.whl
Development
To run the tests or make changes to this repo run the following:
git clone https://github.com/jborean93/sspilib.git
pip install -r requirements-dev.txt
pre-commit install
python -m pip install -e .
# Can compile the sspi extensions on an adhoc basis
# python setup.py build_ext --inplace
From there an editor like VSCode can be used to make changes and run the test suite.
To recompile the Cython files after a change run the build_ext --inplace command.
If building on Linux or macOS, a version of libsspi from sspi-rs must be compiled with rust.
A copy of libicuuc alongside its headers must be present during compile time.
To compile sspi-rs, download the git repository and run the following.
cargo build \
--package sspi-ffi \
--release
export LD_LIBRARY_PATH="${PWD}/target/release"
export LIBRARY_PATH="${PWD}/target/release"
Structure
This library is merely a wrapper around the SSPI APIs. The high level API under exposes an easier to use Python API for SSPI. The functions under the namespace expose the various SSPI functions under a more Pythonic snake_case format. For example the function is exposed as .