semvec/pypi-packages huggingface dataset:
sceptre-request-resolver 0.4.0
A Sceptre resolver to make requests from REST API endpoints
License: Apache-2.0
Requires Python: >=3.8,<3.12
Keywords: sceptre,sceptre-resolver

# sceptre-request-resolver

A Sceptre resolver to make requests from REST API endpoints.

## Motivation

There are some pretty useful REST API endpoints on the internet.  The endpoints
can return lots of different types of data, typically in JSON format.
This simple resolver can retrieve that data and pass it to Sceptre parameters
or scepter_user_data parameters.

## Installation

To install directly from PyPI
```shell
pip install sceptre-request-resolver
```

To install from this git repo
```shell
pip install git+https://github.com/Sceptre/sceptre-request-resolver.git
```

## Usage/Examples

```yaml
parameters|sceptre_user_data:
  <name>: !request <API ENDPOINT>
```

```yaml
parameters|sceptre_user_data:
  <name>: !request
    url: <API ENDPOINT>
    auth: <authentication type>
    user: <auth user name>
    password: <auth password>
```

__Note__:
* This resolver always returns a string.
* Supported authentication types: `basic`

## Example

Simple request:

```yaml
parameters:
  wisdom: !request 'https://ron-swanson-quotes.herokuapp.com/v2/quotes'
```

Request with basic authentication:
```yaml
parameters:
  wisdom: !request
    url: https://private.endpoint.com/
    auth: basic
    user: MyUsername
    password: MyUserPwd
```