find_urls¶
- gwdatafind.find_urls(
- site,
- frametype,
- gpsstart,
- gpsend,
- match=None,
- urltype='file',
- on_gaps='warn',
- host=None,
- api='v1',
- ext='gwf',
- session=None,
- **request_kw,
Query a GWDataFind host for all URLs for a dataset in an interval.
- Parameters:
site (
str) – single-character name of site to matchframetype (
str) – name of dataset to matchgpsstart (
int, optional) – GPS start time of intervalgpsend (
int, optional) – GPS end time of intervalmatch (
str,re.Pattern, optional) – regular expression pattern to match URLs againsturltype (
str, optional) – URL scheme to search foron_gaps (
str, optional) –what to do when the requested all or some of the GPS interval is not covereed by the dataset, one of:
'error': raise aRuntimeError'warn': print a warning but return all available URLs'ignore': return the list of URLs with no warnings
host (
str, optional) – the URL/name of the GWDataFind host to query; if not givenget_default_host()will be used to discover the default host.api (
str, optional) – The API version to use. Defaults to the value of theGWDATAFIND_APIenvironment variable, or"v1"if not set.ext (
str, optional) – the file extension for which to search.session (
requests.Session, optional) – the connection session to use; if not given, aigwn_auth_utils.Sessionwill be created on-the-flytoken – passed directly to
igwn_auth_utils.Session, see SciTokens for more details.token_audience – passed directly to
igwn_auth_utils.Session, see SciTokens for more details.token_scope – passed directly to
igwn_auth_utils.Session, see SciTokens for more details.cert – passed directly to
igwn_auth_utils.Session, see X.509 for more details.request_kw – other keywords are passed to
igwn_auth_utils.get()
- Raises:
requests.RequestException – if the request fails for any reason
RuntimeError – if gaps in the dataset are found and
on_gaps="error"was given