New mlstdb ping subcommand for probing a single API endpoint and displaying the HTTP status and response body. Authentication is attempted automatically in priority order: personal API key, OAuth session token, unauthenticated fallback (with a warning). The --no-auth flag skips all authentication, matching the behaviour of mlstdb update --no-auth.
New ping_url() function in mlstdb.core.auth encapsulates the auth-priority logic shared by the ping command.
Personal API key support (BIGSdb ≥ v1.53.0): mlstdb connect --api-key registers a key generated from your BIGSdb profile page. The key is stored in ~/.config/mlstdb/api_keys (0600) and used automatically by update and fetch in preference to OAuth tokens.
New setup_api_key() and retrieve_api_key() functions in mlstdb.core.auth for storing and retrieving personal API keys.
create_session() in mlstdb.core.download now accepts an api_key parameter; when set it creates a plain requests.Session with the X-API-Key header.
remove_db_credentials() now also removes stored API keys when purging a site's credentials.
Fixed
TypeError: argument of type 'NoneType' is not iterable in mlstdb connect --db pubmlst on Rocky Linux and WSL2 (#35). Root cause: rauth 0.7.3 _parse_optional_params calls req_kwargs.get('params') without a default, raising TypeError when params is absent from request kwargs. Fixed by passing params={} to every bare OAuth1Session.get() call across auth.py and download.py.
Unsafe r.json()['message'] error parsing in register_tokens() and throughout the download pipeline replaced by a new _parse_error_message() helper, which gracefully handles non-JSON responses (HTML error pages, empty bodies) returned by BIGSdb on
HTTPS redirects or proxy errors.
mlstdb connect now prints actionable clock-sync instructions when the OAuth request token step fails with a timestamp more than 600 seconds error.
check_dir now uses an actual write test instead of os.access, fixing false "Cannot write to directory" errors on NFS-mounted filesystems common in HPC environments. Thanks to @talasjudit for the detailed report and suggested fix. (#32)
last-updated field in scheme info JSON is now capped at 2024-12-31 when running with --no-auth, accurately reflecting the data cutoff date for unauthenticated access. (#31)
Removed the legacy database_version.txt file from the scheme directory. Scheme metadata is now stored exclusively in {scheme}_info.json. (#11)
New mlstdb purge command for removing schemes, STs, or individual alleles
from the local database, with automatic BLAST rebuild afterwards.
Purge an entire scheme: mlstdb purge -s salmonella
Purge a specific ST: mlstdb purge -s salmonella --st 3
Purge a specific allele: mlstdb purge -s salmonella -a aroC:1
Batch purge across multiple schemes from a YAML config file: mlstdb purge -c purge_config.yaml
Before removing a ST, checks whether its alleles are used by other STs and
warns if so — use --force to override
Before removing an allele, lists all STs that will be affected and prompts
for confirmation
BLAST database is rebuilt once at the end, minimising redundant work
Supports --force to skip all confirmation prompts, and --verbose for
detailed logging
Fixed
Incomplete scheme directories (missing profiles or allele files) are now removed
before BLAST database creation when using --no-auth or when authentication
failures leave partial downloads on disk. A warning lists the affected schemes
and advises re-running with authenticated access. (#29)
Corrected JSON key in {scheme_name}_info.json from "locus" to "locii"
for accurate scheme metadata. (#28)