Skip to main content

Helper for AWS services like S3 written in python...

Project description

Helper for AWS services like S3 written in python…

Prerequisites

  • IAM user with read access to S3 and its secret keys

  • AWS CLI configured with the secret keys

  • Python, Pip

Getting Started

Assuming that the configuration of AWS CLI using the corresponding secret keys of the IAM user, set up your environment using Python and virtualenv and install the library using pip once the virtual environment is activated:

$ pip install py-aws-helper

Using s3objectfinder

Sample snippet:

>>> from py_aws_helper import s3objectfinder
>>> bucket=''     # provide bucket name
>>> file_name=''    # provide file name
>>> output = s3objectfinder.find_object(bucket=bucket, file_name=file_name)
>>> print('Total objects fetched: ', output['total_objects_fetched'])
>>> print('Total objects matched: ', output['total_objects_matched'])
>>> for key in output['matched_keys']:
        print('Key: ', key)

Other arguments:

The s3objectfinder module can take in two additional paramters other than the bucket and file_name namely , “prefix” and “delimiter” whose default values have been initiated as empty strings.

The corresponding documentation for populating the “prefix” and “delimiter” arguments can be found here

Project details


Download files

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

Source Distribution

py_aws_helper-0.0.5.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file py_aws_helper-0.0.5.tar.gz.

File metadata

  • Download URL: py_aws_helper-0.0.5.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for py_aws_helper-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5880983696ea6d58dfd48672a08dbb954b7e62583db2dbd175c339bc87891289
MD5 07b92c1a239018dc8fa01e094e5dc536
BLAKE2b-256 6d9f3781fcd72df5e7a850547b2288e6a35df83bdb19258dc748c9678e3b0a48

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