Repository navigation
Add list_databases using physionet.list_projects - #816
Merged
Merged
Conversation
tompollard
commented
Dec 1, 2026
tompollard
left a comment
Member
Author
There was a problem hiding this comment.
Thanks. The alias is correct, and both names resolve to the same function from wfdb and wfdb.io. The offline suite, Ruff and the strict docs build pass locally.
Two points before this becomes a long-term name:
- Scope. #794 left a generic
list_databasesout ofwfdbbecause whole-PhysioNet operations belong inphysionet. Sincephysionethas no simple Python listing function today, keeping it here seems reasonable, but it lists every database, including many with no WFDB records, wherelist_recordsanddownload_recordswill fail. Could the docs say so (only databases with aRECORDSfile work with the record functions), and could the PR description note the change from #794? - Return value.
[slug, title]lists are theget_dbsshape, and as a plain alias the new name can't change it later without a second rename. Returning named tuples such asDatabase(slug, title, version)would read better, and the version could go straight intodownload_records(..., version=...)(the function already selects the latest version).get_dbswould keep returning lists as a separate legacy function.
wfdb.list_databases() returns physionet.list_projects("database"), so
callers get each database's version and access policy as well as its
slug and title, and the listing itself lives in the physionet package.
get_dbs() keeps returning [slug, title] pairs, now built from the same
call. WFDB-Python now requires physionet 0.11.0.
tompollard
force-pushed
the
list-databases-api
branch
from
December 1, 2026 03:45
a2d704c to
1a2d9c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
wfdb.list_databases(), a thin wrapper aroundphysionet.list_projects("database")from physionet 0.11.0 (MIT-LCP/physionet#244). Listing PhysioNet projects now lives in thephysionetpackage, andwfdbreuses it rather than building its own listing.physionet.api.PublishedProjectobjects, with each database'sslug,version,title,access_policyand other metadata, sorted by slug. The version can be passed straight tolist_recordsanddownload_records.all_versions=Truelists every version.RECORDSfile work withlist_recordsanddownload_records.get_dbs()keeps returning[slug, title]pairs, now built from the same call. Its output is unchanged (the same 469 databases live).physionet >= 0.11.0.Related to #672. The
download_databaseanddownload_filesnames need a separate decision about WFDB record files versus whole-project files under #534.Checks
list_databases()returns 469 databases with versions and 643 withall_versions=True, and the docstring example runs.