Skip to content

How to download imzML and ibd files programmatically? #1565

Answered by theodev
theodev asked this question in Q&A
Discussion options

You must be logged in to vote

Our response:

If you want to download the .imzML and .ibd files of a given dataset using the python package, you can use the function 'download_to_dir'.

Bellow is an example:

from metaspace import SMInstance
import getpass

sm = SMInstance(host='https://metaspace2020.eu/')

# if you want to authenticate, uncomment below
# if not sm.logged_in():
#     # Using getpass here prevents the API key from being accidentally saved with this notebook.
#     api_key = getpass.getpass(prompt='API key: ', stream=None)
#     sm.login(api_key=api_key)

sm.dataset(id='ds_id').download_to_dir(path='./')

Replies: 1 comment 1 reply

Comment options

theodev
Aug 12, 2024
Maintainer Author

You must be logged in to vote
1 reply
@yyq83
Comment options

Answer selected by theodev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants