A small utility class for using Kerberos authentication with Python requests
Project description
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lcls_krtc-0.3.1.tar.gz
(14.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lcls_krtc-0.3.1.tar.gz.
File metadata
- Download URL: lcls_krtc-0.3.1.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ebc4346d8692a1cbf0e57a284e262b5d7603c92a5fa7aad0904b8a12ed99f24
|
|
| MD5 |
68dd1eeb8243abff055070387981d1f0
|
|
| BLAKE2b-256 |
0d6619397d69db39c5ab739e4b55dd1b1c8622e1eb4208515f2c369af45fb41c
|
File details
Details for the file lcls_krtc-0.3.1-py3-none-any.whl.
File metadata
- Download URL: lcls_krtc-0.3.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc257ae631700c9f3adaed2c026bf860023d27c8f192146840d31861f0b13fd9
|
|
| MD5 |
a679878c763e286ed616c01eec67f7e9
|
|
| BLAKE2b-256 |
045c0133c2c546799144d94191e344a567e4fd56fee2ef2e3177342e960f58cb
|