A Sceptre resolver to make requests from REST API endpoints
Project description
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
pip install sceptre-request-resolver
To install from this git repo
pip install git+https://github.com/Sceptre/sceptre-request-resolver.git
Usage/Examples
parameters|sceptre_user_data:
<name>: !request <API ENDPOINT>
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:
parameters:
wisdom: !request 'https://ron-swanson-quotes.herokuapp.com/v2/quotes'
Request with basic authentication:
parameters:
wisdom: !request
url: https://private.endpoint.com/
auth: basic
user: MyUsername
password: MyUserPwd
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
Built Distribution
Close
Hashes for sceptre_request_resolver-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c66f735b17016637636fc8eda8100f4752f55672ab87c38d2b4d46c56e677763 |
|
MD5 | 1eb96df4f8de33f6f8d1a33772a2000c |
|
BLAKE2b-256 | da68f4a55691fd78554ed2b3c48bce0756fd45986289e421e05d32c9c98d3457 |
Close
Hashes for sceptre_request_resolver-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f3d993e490729457b6889d8808111e8a73ac1dd6da9507a0f962961ecd6a2c |
|
MD5 | e8913abc582005b7122f82c2c0b9e6a0 |
|
BLAKE2b-256 | 5762f877e22c43846574daf42454b135694d0ac6d780b309e1a1ad31f3604947 |