pycurator.collectors.term_collectors.ZenodoCollector#

class pycurator.collectors.term_collectors.ZenodoCollector(search_terms: Optional[collections.abc.Collection[pycurator._typing.SearchTerm]] = None, credentials: Optional[bool] = None)[source]#

Zenodo collector for search term queries.

Parameters
  • search_terms (list-like, optional) – Terms to search over. Can be (re)set via set_search_terms() or passed in directly to search functions.

  • credentials (str, optional (default=None)) – JSON filepath containing credentials in form {repository_name}: {key}.

__init__(search_terms: Optional[collections.abc.Collection[pycurator._typing.SearchTerm]] = None, credentials: Optional[bool] = None) None[source]#

Methods

__init__([search_terms, credentials])

get_all_metadata(search_dict)

Abstract placeholder method for returning metadata.

get_all_search_outputs(**kwargs)

Queries the API for each search term.

get_individual_search_output(*args, **kwargs)

Abstract placeholder method for search output.

get_query_metadata(object_paths)

Placeholder method for query metadata retrieval.

get_request_output(url[, params, headers])

Return Response and JSON from requests.get().

get_request_output_and_update_query_ref(url)

Return request output and update base.current_query_ref.

load_credentials(credential_filepath)

Load the credential file from the given filepath.

merge_search_and_metadata_dicts(search_dict, ...)

Merges together search and metadata DataFrames by 'on' key.

request_execution()

Raise flag to stop output.

run(**kwargs)

Queries all data from the implemented API.

terminate()

Handle program execution.

track_determinate_progress(coll)

Generator for iterating data and updating progress bar.

track_indeterminate_progress(...)

Progress bar wrapper for indeterminate-length queries.

validate_search_term(func)

Decorator for validating search term object type.

Attributes

accepts_credentials

base_url

search_terms

Property method for search terms.