Skip to main content

datus-aws-common

Shared plumbing for the Datus AWS plugins (datus-glue-plugin, datus-s3-plugin, datus-cloudwatch-plugin, …). It is not a plugin — it registers no datus.plugins entry point — but every AWS plugin depends on it so the boto3 wiring lives in exactly one place.

Extracted once nine AWS plugins needed the same code (the monorepo's "copy small helpers until at least three plugins need them" rule points to extraction well before that).

What it provides

Module Contents
errors PluginError/UsageError/ConfigError/MissingDependencyError/ApiError and exit codes 0/1/2/3/8 (copied from datus-airflow-plugin)
output render_rows / render_one — table / plain / json / yaml (copied)
awsconfig AwsSettings (region + credentials + AssumeRole + endpoint/timeout) and validate_keys for strict per-profile key checking
session build_session (profile/keys/chain + optional STS AssumeRole) and build_client (endpoint override + botocore retry/timeout Config)
client call (botocore ClientError/BotoCoreErrorApiError), paginate (boto3 paginators → flat list), wait_until (monotonic-deadline poller for --wait)
cli AwsContext (lazy, multi-service client cache), add_output_option / confirm / parse_json_arg / parse_datetime_arg, and run (parse → dispatch → error-to-exit-code)

Credential model

Every AWS plugin profile shares the same credential block; resolution mirrors the airflow plugin's S3 deploy:

region: us-east-1
profile: my-aws-profile                     # or explicit keys / the standard chain
access_key_id: ${AWS_ACCESS_KEY_ID}
secret_access_key: ${AWS_SECRET_ACCESS_KEY}
session_token: ${AWS_SESSION_TOKEN}
role_arn: arn:aws:iam::123456789012:role/datus   # short-lived STS AssumeRole
role_session_name: datus                    # optional
external_id: team-a                         # optional
endpoint_url: http://minio:9000             # optional (S3-compatible stores)
timeout: 60                                 # optional botocore connect/read timeout
max_attempts: 3                             # optional botocore retry attempts

Development

uv run --package datus-aws-common pytest datus-aws-common

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datus_aws_common-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datus_aws_common-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file datus_aws_common-0.1.0.tar.gz.

File metadata

  • Download URL: datus_aws_common-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for datus_aws_common-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5f753873977ee140d15a287dcbcc2977f45a75bb5c2b8c1091c9d43cec9b98ae
MD5 a05e3cece3ece54c48cf908fbaf443dc
BLAKE2b-256 77db9b6d2beb13af02024a1196d6eb425fd8f740b7dab819e1faa5ea8cc3362a

See more details on using hashes here.

File details

Details for the file datus_aws_common-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for datus_aws_common-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e22f8993ab53280e09744b25ba6dd345fde45c83df616d86893d503b4a822f56
MD5 160e5f62be4158edaf38d853e0dfc209
BLAKE2b-256 5f17a651761720fd0625d9d4ea3aa1595467760554194efb93b4cac4ab0abc23

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

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