Package: jpl.labcas.downloader
📀 LabCAS DownloaderThis is a simple downloader script forLabCAS, the Laboratory Catalog and Archive System. This script enables you to "bulk download" data from a LabCAS installation such asEarly Detection Research Network's LabCASTheConsortium for Molecular and Cellular Characterization of Screen-Detected Lesions's LabCASOr any other LabCAS installation that supports the LabCAS API.🖥 PrerequisitesThis software works with Python 3.8, 3.9, or 3.10. Other versions may work but have not been tested.💿 InstallationTo install the LabCAS downloader, simply use the Python package installer,pip, i.e.:pip install jpl.labcas.downloaderYou'll probably want to do this in a virtual environment so the package doesn't conflict with other Python usage on your system. For example, on a typical Unix (or macOS) system, you'd run (where$is the command-line prompt):$python3-mvenvvenv$cdvenv$bin/pipinstalljpl.labcas.downloaderThen use thebin/jpl-labcas-downloaderprogram out of thevenvdirectory.💁‍♀️ UsageTo use the LabCAS Downloader, you'll need to have the following information at the ready:Thecollection IDor thecollection/dataset IDof the data you want to download. For example, if you're after the entire Automated Quantitative Measures of Breast Density Data, use the collection IDAutomated_Quantitative_Measures_of_Breast_Density_Data. However, if you want just theC0250dataset from that collection, useAutomated_Quantitative_Measures_of_Breast_Density_Data/C02520. You can append more/s for nested datasets as needed.Your assigned LabCASusername and the passwordthat authenticates your account.Lastly, theAPI endpointyou want to use:For EDRN, that'shttps://edrn-labcas.jpl.nasa.gov/data-access-api/For the Consortium for Molecular and Cellular Characterization of Screen-Detected Lesions, it'shttps://edrn-labcas.jpl.nasa.gov/data-access-api/Then, run thejpl-labcas-downloaderas follows:jpl-labcas-downloader --username USERNAME --api URL DATA-IDFor example, to download theAutomated_Quantitative_Measures_of_Breast_Density_Datafrom the API athttps://edrn-labcas.jpl.nasa.gov/data-access-api/using usernamejane, run:jpl-labcas-downloader --username jane --api https://edrn-labcas.jpl.nasa.gov/data-access-api/ Automated_Quantitative_Measures_of_Breast_Density_DataYou'll be prompted for your password, and files will be written to the current directory.👉Note:Any existing files will be overwritten.🎨 CustomizationThejpl-labcas-downloadersupports several options as well as environment variables to customize its behavior.--username USERNAMEtells the username to use to authenticate to the API. You can set theLABCAS_USERNAMEenvironment variable to serve as a default. Leave this out to use no authentication.--password PASSWORDindicates the password to use, butthis is insecureas password should not be put on command-lines. TheLABCAS_PASSWORDcan provide the default password. However, if neither the option nor the environment variable is given, you will be prompted for a password.--api URLtells the URL of the LabCAS API to query. It defaults to theLABCAS_API_URLenvironment variable. If neither is given,https://edrn-labcas.jpl.nasa.gov/data-access-api/is the fallback value.--TARGET DIRtells in what directory to write output files. It defaults to the current directory.You can see all the options at a glance by runningjpl-labcas-downloader --help.👥 ContributingWithin the JPL Informatics Center, we value the health of our community as much as the code, and that includes participation in creating and refining this software. Towards that end, we ask that you read and practice what's described in these documents:Ourcontributor's guidedelineates the kinds of contributions we accept.Ourcode of conductoutlines the standards of behavior we practice and expect by everyone who participates with our software.🔧 DevelopmentIf you're a developer of this package, you'll probably do something like the following:$gitclonehttps://github.com/EDRN/labcas-downloader.git$cdlabcas-downloader$python3-mvenvvenv$venv/bin/pipinstall--quiet--upgradepipsetuptools$venv/bin/pipinstall--editable'.[dev]'Then, changes you make to files undersrcwill be immediately reflected invenv/bin/jpl-labcas-downloaderwhen run.venv/binwill also contain supporting development tools.🔢 VersioningWe use theSemVerphilosophy for versioning this software.📃 LicenseThe project is licensed under theApache version 2license.