Metadata-Version: 2.1
Name: sceptre-request-resolver
Version: 0.3.0
Summary: A Sceptre resolver to make requests from REST API endpoints
Home-page: https://github.com/Sceptre/sceptre-request-resolver
License: Apache-2.0
Keywords: sceptre,sceptre-resolver
Author: Khai Do
Author-email: zaro0508@gmail.com
Requires-Python: >=3.8.1,<4.0.0
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: sceptre
Requires-Dist: requests (>=2.28.2,<3.0.0)
Requires-Dist: sceptre (>=3.2.0,<4.0.0) ; extra == "sceptre"
Requires-Dist: validator-collection (>=1.5.0,<2.0.0)
Project-URL: Repository, https://github.com/Sceptre/sceptre-request-resolver
Description-Content-Type: text/markdown

# 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>
```

__Note__: This resolver always returns a string.


## Example

Simple request:

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

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

