initial framework and such

This commit is contained in:
Lynne Megido 2020-04-09 22:12:30 +10:00
parent c13769a49d
commit f5bbee12e6
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
4 changed files with 25 additions and 0 deletions

3
.gitignore vendored
View file

@ -129,3 +129,6 @@ dmypy.json
# Pyre type checker
.pyre/
# custom shit
config.json

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"python.pythonPath": "/mnt/code/python/bcmh/venv/bin/python3.8"
}

18
bcmh.py Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env python3
import boto3
import json, argparse
parser = argparse.ArgumentParser()
parser.add_argument("files", help = "File(s) to upload", nargs = '+')
parser.parse_args()
cfg = json.load(open("config.json")) # TODO: support for ~/.aws/credentials, command line options
s3 = boto3.resource(
's3',
endpoint_url = "https://s3.wasabisys.com", #us-east-1
aws_access_key_id = cfg['access_key_id'],
aws_secret_access_key = cfg['secret_access_key']
)

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
boto3 ~= 1.12