Skip to main content

Home GitHub Documentation License PyPI Tests Trunk Check

Pyjo-AWS

Pyjoyment

Amazon Web Services for Pyjoyment: the requests of its user agent to the APIs of AWS, signed with Signature Version 4, without an SDK. It is for a program that needs a few calls of AWS and no dependency for them, not a replacement of the SDKs of AWS, which have every API.

Installation

From PyPI, with Pyjoyment, which it depends on:

pip install Pyjo-AWS

or, in a project managed with uv:

uv add Pyjo-AWS

The credentials of aws login are refreshed with a signature of ECDSA, which the package cryptography makes, of the extra cryptography, or Python itself without it:

pip install 'Pyjo-AWS[cryptography]'

The development version is installed from the Git repository with uv, which takes the version of Pyjoyment that it needs from Git too, before its release:

uv pip install git+https://github.com/pyjoyment/Pyjo-AWS

Usage

Pyjo.AWS.Client calls an operation of an API of AWS, with the credentials, the region and the endpoint that the AWS CLI finds: of the environment, of a profile with its keys, SSO of aws sso login, a session of aws login, a role or credential_process, of a web identity, of the container of ECS or EKS Pod Identity, or of the instance of EC2. The call is the operation in the protocol of its API, with the names that its documentation has, and its result is the XML of the response, as a Pyjo.DOM object, or its JSON:

import Pyjo.AWS.Client
import Pyjo.AWS.Protocol.Query
import Pyjo.AWS.Protocol.RestJSON

sts = Pyjo.AWS.Client.new(service='sts')
print(sts.call(Pyjo.AWS.Protocol.Query.new('GetCallerIdentity', version='2011-06-15')).at('Arn').text)

lambda_ = Pyjo.AWS.Client.new(service='lambda', region='eu-central-1')
print(lambda_.call(Pyjo.AWS.Protocol.RestJSON.new('GET', '/2018-10-31/layers'))['Layers'])

The protocols are Query, of STS, IAM, SQS and SNS, JSON, of DynamoDB, KMS and Secrets Manager, RestJSON, of Lambda and API Gateway, and RestXML, of S3 and Route 53:

import Pyjo.AWS.Config
import Pyjo.AWS.Protocol.JSON
import Pyjo.AWS.Protocol.RestXML

s3 = Pyjo.AWS.Client.new(service='s3', config=Pyjo.AWS.Config.new(profile='dev'))
dom = s3.call(Pyjo.AWS.Protocol.RestXML.new('GET', '/my-bucket', query={'list-type': 2, 'prefix': 'logs/'}))
print(dom.find('Contents > Key').map('text').join('\n'))

secrets = Pyjo.AWS.Client.new(service='secretsmanager')
call = Pyjo.AWS.Protocol.JSON.new('secretsmanager.GetSecretValue', {'SecretId': 'db'})
print(secrets.call(call)['SecretString'])

call_p is the same call, non-blocking, which returns a Pyjo.Promise object, as an action of Pyjoyment awaits it:

@get('/whoami')
async def whoami(c):
    dom = await sts.call_p(Pyjo.AWS.Protocol.Query.new('GetCallerIdentity', version='2011-06-15'))
    c.render(json={'arn': dom.at('Arn').text})

An error of AWS is a Pyjo.AWS.Error, with the code and the message of the response:

import Pyjo.AWS.Error

try:
    s3.call(Pyjo.AWS.Protocol.RestXML.new('GET', '/my-bucket/missing.txt'))
except Pyjo.AWS.Error.object as e:
    print(e.code, e.status, e.request_id)

Pyjo.AWS.SigV4 signs a request of the user agent without the client, as in the event start of the user agent, with the credentials of the environment, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN, and the region of AWS_REGION:

import Pyjo.AWS.SigV4
import Pyjo.UserAgent

signer = Pyjo.AWS.SigV4.new(service='lambda', region='eu-central-1')
ua = Pyjo.UserAgent.new()
ua.on('start', lambda ua, tx: signer.sign(tx.req))
print(ua.get('https://lambda.eu-central-1.amazonaws.com/2018-10-31/layers').result.json())

S3 signs its path as it is sent, and the hash of the body in a header of its own, as the client signs it:

signer = Pyjo.AWS.SigV4.new(service='s3', normalize_path=False, double_encode=False, content_sha256=True)

Examples

examples/ has applications of Pyjoyment.Lite that call AWS, as a bucket of S3 as a website:

uv run python examples/s3.py --profile myprofile --bucket mybucket daemon

Documentation

The documentation of the API is on Read the Docs.

License

Artistic License 2.0, as Pyjoyment. The cases of the AWS Signing Test Suite in t/aws-signing-test-suite are under the Apache License 2.0 of their own.

Metadata

Release files for Pyjo-AWS 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Pyjo-AWS 0.1.0
File Size Uploaded Provenance Actions
pyjo_aws-0.1.0.tar.gz 98.7 kB With provenance Details for pyjo_aws-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Pyjo-AWS 0.1.0
File Interpreter ABI Platform Actions
pyjo_aws-0.1.0-py3-none-any.whl Python 3 none any Details for pyjo_aws-0.1.0-py3-none-any.whl

Total release size: 161.3 kB

Release files / pyjo_aws-0.1.0.tar.gz

Download URL pyjo_aws-0.1.0.tar.gz
Size 98.7 kB
Tags Source
SHA-256 checksum
How to use checksums
608df82ca87c71d908d3d747bbc2b4e6287d02fd284136c80f10701e0a5d5648
BLAKE2b-256 checksum
How to use checksums
abc41136889443b4924378c1b5147a841f44205604945497404483034164ae68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / pyjo_aws-0.1.0-py3-none-any.whl

Download URL pyjo_aws-0.1.0-py3-none-any.whl
Size 62.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0646547760d9be801cc5ff55fefafb97343a43c56630a0ab99d3d8f4c71a953f
BLAKE2b-256 checksum
How to use checksums
2c39616215250586e0ca44bf6a22ee5f5e12a637f7a67ea0538b347955e84f88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for Pyjo-AWS 0.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyjo_aws-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page