Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.178s · 26.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.9s · import 1.040s · 27MB
24MB installed
● package 24MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
download_umls
✓ from umls_downloader import download_umls
✗ import umls_downloader ... umls_downloader.download_umls()
common but verbose; recommended import is from umls_downloader import download_umls
download_rxnorm
✓ from umls_downloader import download_rxnorm
✗ from umls_downloader.rxnorm import download_rxnorm
wrong: no submodule rxnorm; all functions are top-level
download_snomed
✓ from umls_downloader import download_snomed
✗ from umls_downloader import download_snomedct
wrong: function is download_snomed, not download_snomedct
Download UMLS Metathesaurus MRCONSO.RRF for a given release version. API key required.
from umls_downloader import download_umls
# Requires UMLS API key from https://uts.nlm.nih.gov/uts/
# Set environment variable UMLS_API_KEY or pass directly
path = download_umls(apikey='YOUR_API_KEY', version='2023AA')
print(f'Downloaded MRCONSO.RRF to {path}')
Errors
Common errors & fixes
UTSProfileError: Authentication error. Please check your UMLS API key.
Invalid or missing UMLS API key.
fixSet UMLS_API_KEY environment variable or pass valid apikey to download function.
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://download.nlm.nih.gov/umls/...
The requested UMLS version (e.g., '2020AA') is no longer available or the URL changed.
fixUse a supported version (e.g., '2023AA' or latest). Check https://www.nlm.nih.gov/research/umls/licensedcontent/umlsknowledgesources.html
AttributeError: module 'umls_downloader' has no attribute 'download_snomedct'
The function is named download_snomed, not download_snomedct.
fixUse download_snomed instead.
FileNotFoundError: [Errno 2] No such file or directory: 'MRCONSO.RRF' after download
The file is extracted inside a subdirectory (e.g., '2023AA/META/MRCONSO.RRF') but the function returns the wrong path in some versions.
fixUpdate to latest version (0.1.3) and ensure you use the returned path directly.
Upgrade
Version history
0.1.3latest on PyPI · released Apr 2, 2024
Audit
Dependencies
requestsrequiredHTTP requests for UMLS TGT authentication and downloads