Skip to content

Struggling to use obstore with s3-compatible Open Storage Network bucket #511

Closed Answered by rsignell
rsignell asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, @maxrjones figured this out!

endpoint = "https://usgs.osn.mghpcc.org"
path = "esip/rsignell/testing/shyfem"
file = "nos00.nc"
scheme = "s3://"

# Create the S3Store
store = S3Store.from_url(f"{scheme}{path}", endpoint=endpoint, skip_signature=True, region='us-east-1')
for obs in obstore.list(store):
    print(obs)

produces:

[{'path': 'nos00.nc', 'last_modified': datetime.datetime(2025, 7, 17, 21, 1, 10, 978000, tzinfo=datetime.timezone.utc), 'size': 2068427360, 'e_tag': '"2742f2bc8880d316d866e23fd628e576-395"', 'version': None}, {'path': 'nos01.nc', 'last_modified': datetime.datetime(2025, 7, 11, 17, 46, 32, 270000, tzinfo=datetime.timezone.utc), 'size': 2068427836, 'e_tag': '"d3ad0…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@kylebarron
Comment options

@rsignell
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rsignell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants