Skip to content

IanDanielM/boto3-s3-simple-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS S3 operations

A simple AWS S3 operations library for Python.

Installation

pip install s3learning

AWS Credentials Setup

This library requires AWS credentials to authenticate with AWS services. You can set up your credentials in one of the following ways:

  1. Environment variables:
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_DEFAULT_REGION=your_preferred_region
  1. AWS credentials file (~/.aws/credentials):
[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key
  1. AWS config file (~/.aws/config):
[default]
region = your_preferred_region

For more information, see AWS credentials configuration.

Usage

from s3simplified import S3Bucket, S3Object

# Create a bucket handler
bucket_handler = S3Bucket('us-east-1')
buckets = bucket_handler.list_buckets()
print(f"Available buckets: {buckets}")

# Work with objects in a bucket
object_handler = S3Object('us-east-1', 'my-bucket-name')
object_handler.upload_file('local_file.txt', 'remote_name.txt')

Features

  • Bucket operations: create, list, delete buckets
  • Object operations: upload, download, delete, list objects
  • Lifecycle policy management
  • Resource existence checking

About

Simple S3 usage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages