Metadata-Version: 2.1
Name: intersight-auth
Version: 0.1.2
Summary: Intersight Authentication helper for requests
Home-page: https://github.com/cgascoig/intersight-auth
Author: Chris Gascoigne
Author-email: cgascoig@cisco.com
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: cryptography (>=37.0.2,<38.0.0)
Requires-Dist: requests (>=2.27.1,<3.0.0)
Project-URL: Repository, https://github.com/cgascoig/intersight-auth
Description-Content-Type: text/markdown

# intersight-auth

This module provides an authentication helper for requests to make it easy to make [Intersight API](https://intersight.com/apidocs/introduction/overview/) calls using [requests](https://requests.readthedocs.io/en/latest/). 

## 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']}")
```


