lexmount-extra
Extra utilities for Lexmount Python SDK projects.
Install
pip install lexmount-extra
The package uses ntlm-auth for non-Windows NTLM credentials, pyspnego for
Windows SSPI-backed Kerberos/NTLM, pyspnego[kerberos] for non-Windows
Kerberos, and pycryptodome as an MD4 fallback for Python/OpenSSL builds that
do not expose hashlib.new("md4").
On non-Windows Debian/Ubuntu images, installing the Kerberos dependency may
also require the system package that provides krb5-config:
sudo apt-get install libkrb5-dev
Usage
from lexmount_extra import (
createKerberosAuthCallback,
createNTLMAuthCallback,
generateKerberosToken,
generateNTLMChallengeToken,
generateNTLMResponseToken,
)
type1_token = generateNTLMChallengeToken("web.lab.local", "LAB")
type3_token = generateNTLMResponseToken(
"http://web.lab.local/",
"web.lab.local",
"LAB",
"NTLM <server-type2-token>",
"alice",
"P@ssw0rd123!",
)
kerberos_token = generateKerberosToken(
"HTTP@web.lab.test",
"server-token",
)
Pythonic snake_case aliases are available for every Node-compatible camelCase function.
Lexmount authentication callbacks
from lexmount import register_integrated_auth_callback
from lexmount_extra import createKerberosAuthCallback, createNTLMAuthCallback
ntlm_auth = createNTLMAuthCallback({
"hostname": "web.lab.local",
"domain": "LAB",
})
kerberos_auth = createKerberosAuthCallback({
"hostname": "web.lab.test",
})
register_integrated_auth_callback(session, ntlm_auth)
register_integrated_auth_callback(session, kerberos_auth)
Both callback factories can be called without options. NTLM defaults to
USERDNSDOMAIN and USERDOMAIN when those environment variables exist.
Kerberos derives the HTTP@host service principal off Windows or HTTP/host
on Windows from the authentication challenge origin when neither spn nor
hostname is provided.
Kerberos integrated authentication
Windows Kerberos generation uses SSPI through pyspnego, avoiding the
non-Windows gssapi dependency. Non-Windows platforms continue to use
gssapi through pyspnego[kerberos].
NTLM integrated authentication
Windows NTLM generation uses SSPI through pyspnego. Type 1 and Type 3 tokens
both support explicit username/password credentials, and Type 3 can also
use the current Windows logon session when credentials are omitted. The Lexmount
callback keeps the SSPI context between Type 1 and Type 3 by using the request's
frameId and requestId.
Non-Windows platforms use ntlm-auth. They support Type 1 and Type 3 with
explicit username/password credentials; Type 3 without credentials returns
an empty token.
Metadata
Release files for lexmount-extra 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lexmount_extra-0.1.2.tar.gz | 9.9 kB | With provenance | Details for lexmount_extra-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lexmount_extra-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for lexmount_extra-0.1.2-py3-none-any.whl |
Total release size: 20.8 kB
Release files / lexmount_extra-0.1.2.tar.gz
| Download URL | lexmount_extra-0.1.2.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f35b27fa4c1e3e92fb2da8453652b7fe2d6618726ab2ff7dadfd5625e2b083f
|
|
BLAKE2b-256 checksum How to use checksums |
71af7ac18cae1533903900b4b71ae29ab353a8f0a7315f89b43ca7d9e126aaff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 27, 2026.
Transparency logRelease files / lexmount_extra-0.1.2-py3-none-any.whl
| Download URL | lexmount_extra-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
991e4ea17ae4c0f47ca2921f2f30cbe81815e146bbd5a9770df54882d01e1a9a
|
|
BLAKE2b-256 checksum How to use checksums |
14786c98c6cc0973c13c39c0f13eac8f18f2ca061fa3cee2c69a2eba1230f012
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 27, 2026.
Transparency logSecurity for lexmount-extra 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for lexmount_extra-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.