Skip to main content

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


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.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

lcls_krtc-0.3.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file lcls-krtc-0.3.0.tar.gz.

File metadata

  • Download URL: lcls-krtc-0.3.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for lcls-krtc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4e474f3bc9d99e41d031a0967f2b8df5800fb66ede9e2c4e8f912a8a6f54b4de
MD5 b5386c39b904c4e7d49e14b0abb81f87
BLAKE2b-256 76f13496f49c06255c0ff1af34ccf893e7d4939e88df9f74adf39619583211e7

See more details on using hashes here.

File details

Details for the file lcls_krtc-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: lcls_krtc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for lcls_krtc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d5b5d3b34ad25e187b2aaf2e67937b38aacc52de03e34659de8d609766dc6ca
MD5 322055a0f8614b3b10d9a7992cde82c1
BLAKE2b-256 efcf963af318921ba4e57c7aef69275cc63ad75210644edcb3abac88d2e272c5

See more details on using hashes here.

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