Skip to main content

AWS Python SDK

Simple wrapper for AWS boto3 sdk commonly used functions.

Provide the following environment variables:

  • ENV: development | production | ...
  • AWSPROFILE: A named profile (non default) in the credential file, e.g.: 'myprofile'
  • AWSREGION: A region name, e.g.: 'eu-west-1

AWSPROFILE and AWSREGION are needed in development only, production uses the default session / client configuration.

Installation

pip install actvalue.aws-pysdk

Usage

from aws_pysdk import s3_write, s3_read

# Write to S3
s3_write('my-bucket', 'hello.txt', 'Hello World', 'text/plain')

# Read from S3
response = s3_read('my-bucket', 'hello.txt')
content = response['Body'].read()

# Get Signed url
params = {
    'Bucket': 'my-bucket',
    'Key': 'my-file.txt',
    'ContentType': 'text/plain'  # optional
}

# Get a read URL
read_url = s3_get_signed_url(params, 'READ', 3600)  # expires in 1 hour

# Get a write URL
write_url = s3_get_signed_url(params, 'WRITE', 3600)

Develpment and test

Create and activate virtual environment

python -m venv .venv
.\.venv\Scripts\activate

Install package in development mode

pip install -e .

Download files

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

Source Distribution

actvalue_aws_pysdk-0.2.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

actvalue.aws_pysdk-0.2.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file actvalue_aws_pysdk-0.2.0.tar.gz.

File metadata

  • Download URL: actvalue_aws_pysdk-0.2.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for actvalue_aws_pysdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c6eb1a9967e0e7d12bfe7acd9db8a9107a81fb8598d2ca4e67f5bd3595aeb43b
MD5 71852e41669b603ce0569d5f004cf3d6
BLAKE2b-256 413ee0d3133d50ad1bf35730579f84008854f85e9bc1e9d514a9ccdb3a8b6b6a

See more details on using hashes here.

File details

Details for the file actvalue.aws_pysdk-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for actvalue.aws_pysdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8387c501c0befb621465886430657fd117e14d4c18dfc9033d9cf9fe3fae2cb
MD5 9693fada46d3cc3441a0c65e8002de9c
BLAKE2b-256 3edafa1563a11df0601f7a661a900a6e873279bd8c27f14061eedd8b62ba36c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page