Skip to content

Commit

Permalink
Merge pull request #25 from umr-lops/fix_versioning
Browse files Browse the repository at this point in the history
add example for S3 protocol in readme and fix version of the lib
  • Loading branch information
agrouaze authored Apr 19, 2024
2 parents 3070725 + 0fd03a1 commit 2fc774c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,11 @@ DataTree('None', parent=None)

```

Example of usage for S3: access

```pycon
url = 's3:///eodata/..../.SAFE'
storage_options = {"anon": False, "client_kwargs": {"endpoint_url": 'https://'+entrypoint_url, 'aws_access_key_id':access_key,
'aws_secret_access_key':secret_key}}
reader = Sentinel1Reader(url,backend_kwargs={"storage_options": storage_options})
```
13 changes: 9 additions & 4 deletions safe_s1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from importlib.metadata import version
from .metadata import Sentinel1Reader

import traceback
#import safe_s1
from safe_s1.reader import Sentinel1Reader
try:
__version__ = version("safe_s1")
from importlib import metadata
except ImportError: # for Python<3.8
import importlib_metadata as metadata
try:
__version__ = metadata.version("xarray-safe-s1")
except Exception:
print('trace',traceback.format_exc())
__version__ = "999"
File renamed without changes.

0 comments on commit 2fc774c

Please sign in to comment.