Skip to main content

SSPI API bindings for Python

Reason this release was yanked:

This was used for reserving the namespace only

Project description

Python SSPI Library

Test workflow PyPI version License

This library provides Python functions that wraps the Windows SSPI API. It is designed to be a low level interface that other libraries can easily leverage to use with SSPI integeration.

Requirements

  • Python 3.8+

More requires 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 sspi

To install from source run the following:

git clone https://github.com/jborean93/pysspi.git
python -m pip install build
python -m build
pip install dist/sspi-*.whl

Development

To run the tests or make changes to this repo run the following:

git clone https://github.com/jborean93/pysspi.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.

Structure

This library is merely a wrapper around the SSPI APIs. The functions under the sspi namespace expose the various SSPI functions under a more Pythonic snake_case format. For example the AcquireCredentialsHandle function is exposed as sspi.acquire_credentials_handle.

Errors are raised as a WinError which contains the error message as formatted by Windows and the error code. Some of the objects and constants are exposed as Python clasess/dataclasses/enums for ease of use. Some functions expose buffers that contain dynamically allocated memory from SSPI if requested and need to be explicitly freed if needed. Please read through the docstring of the function that will be used to learn more about how to use them.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sspi-0.0.1.tar.gz (37.1 kB view hashes)

Uploaded Source

Built Distributions

sspi-0.0.1-cp312-cp312-win_amd64.whl (554.4 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

sspi-0.0.1-cp312-cp312-win32.whl (470.3 kB view hashes)

Uploaded CPython 3.12 Windows x86

sspi-0.0.1-cp311-cp311-win_amd64.whl (550.0 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

sspi-0.0.1-cp311-cp311-win32.whl (467.2 kB view hashes)

Uploaded CPython 3.11 Windows x86

sspi-0.0.1-cp310-cp310-win_amd64.whl (550.2 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

sspi-0.0.1-cp310-cp310-win32.whl (469.1 kB view hashes)

Uploaded CPython 3.10 Windows x86

sspi-0.0.1-cp39-cp39-win_amd64.whl (555.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

sspi-0.0.1-cp39-cp39-win32.whl (474.3 kB view hashes)

Uploaded CPython 3.9 Windows x86

sspi-0.0.1-cp38-cp38-win_amd64.whl (556.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

sspi-0.0.1-cp38-cp38-win32.whl (474.6 kB view hashes)

Uploaded CPython 3.8 Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page