argopy.gdacfs#
- class gdacfs(path: str | Path | None = None, cache: bool = False, cachedir: str = '', **kwargs)[source]#
Argo file system for any GDAC path
- Parameters:
path (str, optional) β GDAC path to create a file system for. Support any possible GDAC protocol. If not specified, value from the global option
gdac
will be used.cache (bool (False))
cachedir (str (from OPTIONS))
**kwargs ((optional)) β Other arguments are passed to
fsspec.filesystem()
- Return type:
A directory based file system based on
argopy.stores.ArgoStoreProto
Examples
fs = gdacfs("https://data-argo.ifremer.fr") fs = gdacfs("https://usgodae.org/pub/outgoing/argo") fs = gdacfs("ftp://ftp.ifremer.fr/ifremer/argo") fs = gdacfs("/home/ref-argo/gdac") fs = gdacfs("s3://argo-gdac-sandbox/pub") with argopy.set_options(gdac="s3://argo-gdac-sandbox/pub"): fs = gdacfs()
fs = gdacfs("http") # "https" > https://data-argo.ifremer.fr fs = gdacfs("us-http") # "us-https" > https://usgodae.org/pub/outgoing/argo fs = gdacfs("ftp") # > ftp://ftp.ifremer.fr/ifremer/argo fs = gdacfs("s3") # or "aws" > s3://argo-gdac-sandbox/pub
Warning
This class does not check if the path is a valid Argo GDAC
See also
argopy.utils.check_gdac_path()
,argopy.utils.list_gdac_servers()
,argopy.utils.shortcut2gdac()
- __init__(*args, **kwargs)#
Methods
__init__
(*args,Β **kwargs)path2protocol
(path)Narrow down any path to a supported protocol, raise GdacPathError if protocol not supported
Attributes
protocol2fs
Dictionary mapping path protocol to Argo file system to instantiate