Introduction
This package generate http 1.1 AWS Signature Version 4 Authentication headers.
Function Arguments
| argument name | data type | default value | description |
|---|---|---|---|
| service | str | service name | |
| region | str | region name | |
| access_key | str | access key | |
| secret_key | str | secret key | |
| url | str | http request url | |
| httpMethod | str | standard http 1.1 method | |
| canonicalHeaders | dict | AWS Service required headers | |
| otherHeaders | dict | other non-mandatory headers | |
| queryString | str | '' | |
| payload | str | '' | valid payload |
Function retrun value
The return value data type is dict and including AWS Signature Version 4 Authentication headers.
Demo Code
from awsv4sign import generate_http11_header
import requests
import json
service = 'execute-api'
region = 'cn-north-1'
access_key = ''
secret_key = ''
session_token = ''
url = ''
httpMethod = 'post'
canonicalHeaders = {}
otherHeaders = {'x-api-key': '', 'content_type': 'application/json' ,'x-amz-security-token': session_token}
queryString = ''
payload = {}
result = requests.post(url, data=json.dumps(payload), headers=generate_http11_header(service, region, access_key, secret_key, url, 'post', canonicalHeaders, otherHeaders, queryString, json.dumps(payload)))
print(result.json())
Generated http 1.1 heards could be used by pycurl, urllib3 and so on packages.
Metadata
Release files for aws-v4-signature 2.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 |
|---|---|---|---|---|
| aws_v4_signature-2.0.tar.gz | 7.8 kB | Without provenance | Details for aws_v4_signature-2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_v4_signature-2.0-py3-none-any.whl | Python 3 | none | any | Details for aws_v4_signature-2.0-py3-none-any.whl |
Total release size: 16.1 kB
Release files / aws_v4_signature-2.0.tar.gz
| Download URL | aws_v4_signature-2.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25ce22b05219302ffcb2db79463daa1c3c7f46d9c161f5b5181630318f739b73
|
|
BLAKE2b-256 checksum How to use checksums |
1c39e5b843dcc8ee54f324619cc7d57bea73403b15810a2771eec2962522a97d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|
Release files / aws_v4_signature-2.0-py3-none-any.whl
| Download URL | aws_v4_signature-2.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8ab92eac0b89a99c8b3e1e869ecaf84fbc3535ebf9603177d8acd71295aade5
|
|
BLAKE2b-256 checksum How to use checksums |
5b61dc796d19a1f1d7aab02bf8615e264aa0f11ae159ef875a730b8a03f7792f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|
Security for aws-v4-signature 2.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.