Skip to main content

krtc

This is a very small utility class for using Kerberos authentication with Python requests.

Installation

$ pip install lcls-krtc
$ conda install -c conda-forge krtc

Usage example

To use this when making calls to a web service:

import requests
from krtc import KerberosTicket
from urllib.parse import urlparse

ws_url = "https://ws.slac.stanford.edu/ws/getData.json"
krbheaders = KerberosTicket("HTTP@" + urlparse(ws_url).hostname).getAuthHeaders()
r = requests.get(ws_url, headers=krbheaders)
print(r.json())

Metadata

Release files for lcls-krtc 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lcls-krtc 0.3.1
File Size Uploaded
lcls_krtc-0.3.1.tar.gz 14.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lcls-krtc 0.3.1
File Interpreter ABI Platform
lcls_krtc-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / lcls_krtc-0.3.1.tar.gz

Download URL lcls_krtc-0.3.1.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7ebc4346d8692a1cbf0e57a284e262b5d7603c92a5fa7aad0904b8a12ed99f24
BLAKE2b-256 checksum
How to use checksums
0d6619397d69db39c5ab739e4b55dd1b1c8622e1eb4208515f2c369af45fb41c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / lcls_krtc-0.3.1-py3-none-any.whl

Download URL lcls_krtc-0.3.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc257ae631700c9f3adaed2c026bf860023d27c8f192146840d31861f0b13fd9
BLAKE2b-256 checksum
How to use checksums
045c0133c2c546799144d94191e344a567e4fd56fee2ef2e3177342e960f58cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page