Skip to content

Commit

Permalink
Deprecated get_s3fs_session
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherwin-14 committed Jul 20, 2024
1 parent 7a79ea5 commit c323124
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import s3fs
from multimethod import multimethod as singledispatchmethod
from pqdm.threads import pqdm
from typing_extensions import deprecated

import earthaccess

Expand Down Expand Up @@ -197,6 +198,7 @@ def set_requests_session(
else:
resp.raise_for_status()

@deprecated("Use get_s3_filesystem instead")
def get_s3fs_session(
self,
daac: Optional[str] = None,
Expand All @@ -206,6 +208,25 @@ def get_s3fs_session(
) -> s3fs.S3FileSystem:
"""Returns a s3fs instance for a given cloud provider / DAAC.
Parameters:
daac: any of the DAACs, e.g. NSIDC, PODAAC
provider: a data provider if we know them, e.g. PODAAC -> POCLOUD
endpoint: pass the URL for the credentials directly
Returns:
a s3fs file instance
"""
return self.get_s3_filesystem(daac, concept_id, provider, endpoint)

def get_s3fs_filesystem(
self,
daac: Optional[str] = None,
concept_id: Optional[str] = None,
provider: Optional[str] = None,
endpoint: Optional[str] = None,
) -> s3fs.S3FileSystem:
"""Returns a s3fs instance for a given cloud provider / DAAC.
Parameters:
daac: any of the DAACs, e.g. NSIDC, PODAAC
provider: a data provider if we know them, e.g. PODAAC -> POCLOUD
Expand Down

0 comments on commit c323124

Please sign in to comment.