Skip to content

Commit c8fc0d6

Browse files
committed
update
1 parent 8af5391 commit c8fc0d6

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ __pycache__/
44
*$py.class
55
*.pyc
66
global_secrets.py
7+
Bucket_request.py
78
# C extensions
89
*.so
910

s3fstest.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import os
2+
import boto3
3+
import s3fs
4+
5+
fs = s3fs.S3FileSystem(
6+
anon=False,
7+
profile_name='default', # Use credentials from the [RSIROSS] section of ~/.aws/credentials
8+
client_kwargs={'endpoint_url': 'https://ross.science.roche.com'} # Set endpoint URL to ROSS
9+
)
10+
11+
12+
13+
bucket = 'storagegrid-training'
14+
15+
test = fs.ls(bucket) # List files in a bucket
16+
17+
print (test)
18+
19+
20+
filename= "test1.txt"
21+
22+
23+
print filename
24+
25+
result = fs.put(filename,bucket + "/" + filename)
26+
print result

test1.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test1

0 commit comments

Comments
 (0)