Skip to main content

mlstdb

Tests GitHub release (latest by date) PyPI - Version PyPI - Python Version Anaconda-Server Badge License: GPL v3 Anaconda-Server Badge

Keep your mlst databases up to date. mlstdb handles OAuth authentication with PubMLST and BIGSdb Pasteur so you can download the latest MLST schemes and build a BLAST database, in two commands.

Full Documentation

Install

conda create -n mlst -c bioconda mlst
conda activate mlst
pip install mlstdb
Other installation methods
# From bioconda (include conda-forge for dependencies)
conda install -c conda-forge -c bioconda mlstdb

# Or install both tools together
conda create -n mlst -c conda-forge -c bioconda mlst mlstdb

# From PyPI only
pip install mlstdb

Quick Start

1. Register with each database (one-time setup):

mlstdb connect --db pubmlst
# or use --api-key for pubmlst (currently not available for pasteur)
mlstdb connect --db pubmlst --api-key
mlstdb connect --db pasteur

This opens a browser for OAuth registration. Follow the prompts to authorise mlstdb.

2. Download schemes and build the BLAST database:

mlstdb update

This downloads the curated MLST schemes from both PubMLST and Pasteur and creates a BLAST database.

3. Use with mlst:

mlst --blastdb blast/mlst.fa --datadir pubmlst your_assembly.fasta

That's it. For advanced scheme exploration, custom filtering, and detailed option reference, see the full documentation.

Probing API endpoints

To verify that a specific API endpoint is reachable and your credentials are working, use mlstdb ping:

mlstdb ping https://rest.pubmlst.org/db/pubmlst_neisseria_seqdef/schemes/67/profiles_csv --db pubmlst

See the ping documentation for the full reference.

Removing contaminated STs or alleles

Discovered a dodgy sequence type or allele in your local database? You can remove it without re-downloading the whole scheme:

# Remove a single ST (orphaned alleles are cleaned up automatically)
mlstdb purge --scheme salmonella --st 3

# Remove a specific allele (also removes any STs that reference it)
mlstdb purge --scheme salmonella --allele aroC:1

The BLAST database is rebuilt automatically after each purge. See the purge documentation for the full reference.

Caution

  • Back up your existing MLST databases before running updates.
  • If using mlstdb fetch to build a custom scheme list, double-check that all schemes are compatible with the mlst tool. Not all schemes are validated for use with mlst. The mlst tool is designed for bacterial species only.
  • mlstdb purge permanently modifies your local database. Take a backup of your pubmlst/ directory before purging, especially when using --force.

Acknowledgements

Built upon the work of:

License

mlstdb was previously licensed under MIT. As of version 0.1.7, it is licensed under GPL v3. Original MIT‑licensed code is preserved and attributed according to MIT terms.

For additional support, please raise an issue.

Metadata

Release files for mlstdb 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlstdb 1.3.1
File Size Uploaded Provenance Actions
mlstdb-1.3.1.tar.gz 41.1 kB Without provenance Details for mlstdb-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlstdb 1.3.1
File Interpreter ABI Platform Actions
mlstdb-1.3.1-py3-none-any.whl Python 3 none any Details for mlstdb-1.3.1-py3-none-any.whl

Total release size: 90.2 kB

Release files / mlstdb-1.3.1.tar.gz

Download URL mlstdb-1.3.1.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9e3e7ee3ec7b0c6180534c1a7ebfae614112651d5fb10afd3d2d0a722a739332
BLAKE2b-256 checksum
How to use checksums
f85a4cdbc9916ebff4585800051e10954df84a60be2d50c2893ee1b697b4e193
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.15.2"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.5 27 Jan 2026","python":"3.15.2","system":{"name":"Linux","release":"7.0.0-1020-azure"}} HTTPX2/2.17.0

Release files / mlstdb-1.3.1-py3-none-any.whl

Download URL mlstdb-1.3.1-py3-none-any.whl
Size 49.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74e815939a572f7bc681a016009347570241575dd66235f639b5c4186918445f
BLAKE2b-256 checksum
How to use checksums
7141128628fa5d6973d00798508872a75f28bafededab8fff77e027eb3b6d393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.15.2"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.5 27 Jan 2026","python":"3.15.2","system":{"name":"Linux","release":"7.0.0-1020-azure"}} HTTPX2/2.17.0

Security for mlstdb 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page