Tavern AWS plugin
This is a Tavern plugin to add AWS Sig4 authentication headers to your calls using requests-aws4auth .
This plugin reuses original requests-based REST plugin from Tavern, so it works with non-AWS endpoints too.
Usage
Install
Regular install via pip: pip install tavern-aws
Tavern integration
Set option tavern_http_backend to aws.
You can do it via project options:
[tool.pytest.ini_options]
tavern_http_backend = aws
or via conftest.py:
def pytest_configure(config: pytest.Config):
config.option.tavern_http_backend = "aws"
Change it back to requests to use regular Tavern's REST plugin.
Tests
Supply AWS credentials as text fields:
test_name: Call endpoint with IAM auth
aws:
access_key: xxxxxxxxxxxxxxxxxxxx
secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
service: appsync
region: us-east-1
stages:
- name: first stage
Or from boto3 session object via pytest fixtures:
import boto3
import botocore.credentials
import pytest
@pytest.fixture(scope="session", autouse=True)
def boto_session() -> boto3.Session:
return boto3.Session()
@pytest.fixture(scope="session", autouse=True)
def boto_credentials(boto_session: boto3.Session) -> botocore.credentials.Credentials:
return boto_session.get_credentials()
test_name: Call endpoint with IAM auth
aws:
access_key: "{boto_credentials.access_key}"
secret_key: "{boto_credentials.secret_key}"
service: appsync
region: us-east-1
session_token: "{boto_credentials.token}"
stages:
- name: first stage
Metadata
Release files for tavern-aws 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tavern_aws-1.1.0.tar.gz | 3.4 kB | Without provenance | Details for tavern_aws-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tavern_aws-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for tavern_aws-1.1.0-py3-none-any.whl |
Total release size: 8.0 kB
Release files / tavern_aws-1.1.0.tar.gz
| Download URL | tavern_aws-1.1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
220c6a5b821b106bbaba483caf850bfae114a54be909498ce70a8309d61ed185
|
|
BLAKE2b-256 checksum How to use checksums |
6ebfd2b6d7ceed6fd25b020621455e6646efeecd40768d79be541b571a597d11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1015-azure
|
Release files / tavern_aws-1.1.0-py3-none-any.whl
| Download URL | tavern_aws-1.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75f5566af801d302fcfcdf187a800b8cd0e67ef33d6a7676ac5b6f8bde98080f
|
|
BLAKE2b-256 checksum How to use checksums |
12ad82e2056e580c5f328b6682db643f3d43e37c6ecdb60ce81bd7d00189a94a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1015-azure
|
Security for tavern-aws 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.