initial framework and such
This commit is contained in:
parent
c13769a49d
commit
f5bbee12e6
4 changed files with 25 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -129,3 +129,6 @@ dmypy.json
|
|||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
|
||||
# custom shit
|
||||
config.json
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.pythonPath": "/mnt/code/python/bcmh/venv/bin/python3.8"
|
||||
}
|
18
bcmh.py
Executable file
18
bcmh.py
Executable 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
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
boto3 ~= 1.12
|
Loading…
Reference in a new issue