skillfed

requests-gssapi

A GSSAPI authentication handler for python-requests

requests-gssapi v1.4.0 360.3K downloads/30d#7,244 on PyPI34
Permissive license ISC AGING released

What it is and what it does

requests-gssapi is a thin authentication handler that plugs into the requests HTTP library to perform GSSAPI-based authentication (commonly Kerberos/SPNEGO). It wraps the lower-level gssapi library and presents a requests-compatible auth handler, allowing you to make HTTP requests to servers that require Kerberos negotiation without managing the authentication handshake yourself.

The package assumes you already have a valid Kerberos credential cache (TGT) available on your system—it handles only the HTTP-level negotiation, not credential acquisition. It supports mutual authentication modes, opportunistic (preemptive) authentication for persistent connections, hostname override for load-balanced environments, and explicit principal or mechanism selection. It is a drop-in replacement for the older requests-kerberos library.

Use it for:

  • Authenticate HTTP requests to Windows/Active Directory-protected services using Kerberos.
  • Access internal APIs and web services that require SPNEGO/Negotiate authentication.
  • Automate WinRM or other Windows management protocol calls over HTTP with Kerberos credentials.
  • Build Python clients for enterprise systems using Kerberos as the authentication mechanism.
  • Replace requests-kerberos in existing codebases without rewriting authentication logic.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds GSSAPI/Kerberos authentication support to the requests HTTP library, enabling secure negotiated authentication for HTTP clients.

Yes, if you need Kerberos authentication for HTTP requests and have a Kerberos infrastructure in place. The package is stable, permissively licensed, and has no known vulnerabilities. Install friction is low. However, it is aging (last release 302 days ago) and requires the gssapi system library to be installed separately; verify that dependency is available in your environment before committing.

Install

requests-gssapi on PyPI

pip

pip install requests-gssapi

uv

uv add requests-gssapi

poetry

poetry add requests-gssapi

Installing requests-gssapi

Before you install

Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 302 days ago, though the repository remains active and the package supports current Python versions (3.8 through 3.14).

License in practice

Licensed under ISC (permissive), allowing unrestricted use, modification, and distribution with minimal restrictions.

Quickstart

pip install requests-gssapi

import requests
from requests_gssapi import HTTPSPNEGOAuth

r = requests.get("http://example.org", auth=HTTPSPNEGOAuth())

A valid Kerberos Ticket-Granting Ticket (TGT) must already exist in the credential cache (verify with klist); the gssapi system library must be installed and available.

Verify before relying

  • Whether the gssapi system library dependency is available on all target platforms or requires separate installation.
  • Current adoption and community activity level beyond download metrics.

Package facts

License ISC (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, gssapi
Maintenance aging — 302 days since the last release
Last repo commit
First released
Downloads 360,283/month — #7,244 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: requests_gssapi-1.4.0-py3-none-any.whl

Keywords: gssapi, requests, auth

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

kerberos http authenticationgssapi requests libraryspnego negotiate authkerberos client pythonwindows integrated authenticationgssapi http client
kerberosauthenticationenterprise

More WWW/HTTP packages