ccaaws
A small uv-managed Python library for creating boto3 sessions and clients,
including assumed-role clients.
Requires Python >= 3.14.
Install
uv add ccaaws
Usage
import ccaaws
# a plain boto3 session, optionally with a named CLI profile and/or region
sess = ccaaws.session(profile="myprofile", region="eu-west-1")
# a client for any AWS service, reusing a session if one is given
s3 = ccaaws.client("s3", sess=sess)
# or let it create its own session
ec2 = ccaaws.client("ec2", profile="myprofile", region="eu-west-1")
# a client built from temporary assumed-role credentials
sts_client = ccaaws.assumeRoleClient(
"s3",
"arn:aws:iam::123456789012:role/myrole",
"mysession",
profile="myprofile",
region="eu-west-1",
)
API
-
session(profile=None, region=None) -> boto3.SessionCreates a new boto3 session, optionally using a named CLI profile and/or region. -
client(service_name, sess=None, profile=None, region=None, **kwargs) -> AnyCreates a client for the given AWS service, reusingsessif provided, otherwise creating a new session fromprofile/region. Extrakwargsare passed through toSession.client(). -
assumeRoleClient(service_name, role_arn, role_session_name, sess=None, profile=None, region=None, duration_seconds=3600, **kwargs) -> AnyCalls STSAssumeRoleforrole_arnand returns a client forservice_namebuilt from the resulting temporary credentials. Extrakwargsare passed through toSession.client().
Development
uv sync
uv run pytest
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccaaws-1.0.0.tar.gz.
File metadata
- Download URL: ccaaws-1.0.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad3ae74f37e0355f54e899ef33adf752c77bde333bb0c7e04182f03541df309e
|
|
| MD5 |
660145bdae0499704e3fdc2910cb1ac2
|
|
| BLAKE2b-256 |
ad36fb1fa1527ca1750770536de277406ed4bab6be2b09d49b90440090723652
|
Provenance
The following attestation bundles were made for ccaaws-1.0.0.tar.gz:
Publisher:
release.yaml on ccdale/ccaaws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccaaws-1.0.0.tar.gz -
Subject digest:
ad3ae74f37e0355f54e899ef33adf752c77bde333bb0c7e04182f03541df309e - Sigstore transparency entry: 2738355819
- Sigstore integration time:
-
Permalink:
ccdale/ccaaws@9fe6b127f5225a9bc540085e3538da2f4071dac4 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ccdale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9fe6b127f5225a9bc540085e3538da2f4071dac4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ccaaws-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ccaaws-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45e77d2ae72097d191c46652ac68028f1118e85d635f8e1b1ff99cabd90cfa35
|
|
| MD5 |
960af3ab4e238823fd9df9fea9614940
|
|
| BLAKE2b-256 |
c4d73f43e6ea2ada77653e6af23cf81f5a3d65bd995dcd28dcb0780614b9263b
|
Provenance
The following attestation bundles were made for ccaaws-1.0.0-py3-none-any.whl:
Publisher:
release.yaml on ccdale/ccaaws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccaaws-1.0.0-py3-none-any.whl -
Subject digest:
45e77d2ae72097d191c46652ac68028f1118e85d635f8e1b1ff99cabd90cfa35 - Sigstore transparency entry: 2738356095
- Sigstore integration time:
-
Permalink:
ccdale/ccaaws@9fe6b127f5225a9bc540085e3538da2f4071dac4 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ccdale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9fe6b127f5225a9bc540085e3538da2f4071dac4 -
Trigger Event:
release
-
Statement type: