Intersight Authentication helper for requests
Project description
intersight-auth
This module provides an authentication helper for requests to make it easy to make Intersight API calls using requests.
Install
pip install intersight-auth
Example
import sys
from intersight_auth import IntersightAuth
from requests import Session
session = Session()
session.auth = IntersightAuth("key.pem", "XYZ/XYZ/XYZ")
response = session.get("https://intersight.com/api/v1/ntp/Policies")
if not response.ok:
print(f"Error: {response.status_code} {response.reason}")
sys.exit(1)
for policy in response.json()["Results"]:
print(f"{policy['Name']}")
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
intersight-auth-0.1.2.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for intersight_auth-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c37b609c9399bb53900dd24c88ae6094b472031676cf98657e9c306a71f7d95e |
|
MD5 | 9c97c5a06124a71f46c9b86b96a3618b |
|
BLAKE2b-256 | f46f39091360506911e4ef0f0766d0877440bb6d16c5a171adfd3c6c075856ad |