download_tgt

download_tgt(url, path, *, api_key=None, force=False)[source]

Download a file via the UMLS ticket granting system.

This implementation is based on the instructions listed at https://documentation.uts.nlm.nih.gov/automating-downloads.html.

Parameters:
  • url (str) – The URL of the file to download, like https://download.nlm.nih.gov/umls/kss/2021AB/umls-2021AB-mrconso.zip

  • path (Union[str, Path]) – The local file path where the file should be downloaded

  • api_key (Optional[str]) – An API key. If not given, is looked up using pystow.get_config() with the umls module and api_key key.

  • force (bool) – Should the file be re-downloaded?

Return type:

None