jpl.labcas.downloader


Namejpl.labcas.downloader JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/EDRN/labcas-downloader
SummaryA simple Python package to download files from LabCAS
upload_time2025-01-03 21:36:18
maintainerSean Kelly
docs_urlNone
authorAsitang Mishra
requires_python>=3.8
licenseapache-2.0
keywords laboratory data labcas downloader automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 📀 LabCAS Downloader

This is a simple downloader script for [LabCAS](https://edrn.nci.nih.gov/data-and-resources/informatics/labcas), the Laboratory Catalog and Archive System. This script enables you to "bulk download" data from a LabCAS installation such as

-   [Early Detection Research Network's LabCAS](https://edrn-labcas.jpl.nasa.gov/)
-   The [Consortium for Molecular and Cellular Characterization of Screen-Detected Lesions's LabCAS](https://mcl-labcas.jpl.nasa.gov/)
-   Or any other LabCAS installation that supports the LabCAS API.


## 🖥 Prerequisites

This software works with Python 3.8, 3.9, or 3.10. Other versions may work but have not been tested.


## 💿 Installation

To install the LabCAS downloader, simply use the Python package installer, `pip`, i.e.:

    pip install jpl.labcas.downloader

You'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):
```console
$ python3 -m venv venv
$ cd venv
$ bin/pip install jpl.labcas.downloader
```
Then use the `bin/jpl-labcas-downloader` program out of the `venv` directory.


## 💁‍♀️ Usage

To use the LabCAS Downloader, you'll need to have the following information at the ready:

-   The **collection ID** or the **collection/dataset ID** of the data you want to download. For example, if you're after the entire Automated Quantitative Measures of Breast Density Data, use the collection ID `Automated_Quantitative_Measures_of_Breast_Density_Data`. However, if you want just the `C0250` dataset from that collection, use `Automated_Quantitative_Measures_of_Breast_Density_Data/C02520`. You can append more `/`s for nested datasets as needed.
-   Your assigned LabCAS **username and the password** that authenticates your account.
-   Lastly, the **API endpoint** you want to use:
    -   For EDRN, that's `https://edrn-labcas.jpl.nasa.gov/data-access-api/`
    -   For the Consortium for Molecular and Cellular Characterization of Screen-Detected Lesions, it's `https://edrn-labcas.jpl.nasa.gov/data-access-api/`

Then, run the `jpl-labcas-downloader` as follows:

    jpl-labcas-downloader --username USERNAME --api URL DATA-ID

For example, to download the `Automated_Quantitative_Measures_of_Breast_Density_Data` from the API at `https://edrn-labcas.jpl.nasa.gov/data-access-api/` using username `jane`, run:

    jpl-labcas-downloader --username jane --api https://edrn-labcas.jpl.nasa.gov/data-access-api/ Automated_Quantitative_Measures_of_Breast_Density_Data

You'll be prompted for your password, and files will be written to the current directory.


👉 **Note:** Any existing files will be overwritten.


### 🎨 Customization

The `jpl-labcas-downloader` supports several options as well as environment variables to customize its behavior.

-   `--username USERNAME` tells the username to use to authenticate to the API. You can set the `LABCAS_USERNAME` environment variable to serve as a default. Leave this out to use no authentication.
-   `--password PASSWORD` indicates the password to use, but **this is insecure** as password should not be put on command-lines. The `LABCAS_PASSWORD` can provide the default password. However, if neither the option nor the environment variable is given, you will be prompted for a password.
-   `--api URL` tells the URL of the LabCAS API to query. It defaults to the `LABCAS_API_URL` environment variable. If neither is given, `https://edrn-labcas.jpl.nasa.gov/data-access-api/` is the fallback value.
-   `--TARGET DIR` tells in what directory to write output files. It defaults to the current directory.

You can see all the options at a glance by running `jpl-labcas-downloader --help`.


## 👥 Contributing

Within 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:

-   Our [contributor's guide](https://github.com/EDRN/.github/blob/main/CONTRIBUTING.md) delineates the kinds of contributions we accept.
-   Our [code of conduct](https://github.com/EDRN/.github/blob/main/CODE_OF_CONDUCT.md) outlines the standards of behavior we practice and expect by everyone who participates with our software.

### 🔧 Development

If you're a developer of this package, you'll probably do something like the following:
```console
$ git clone https://github.com/EDRN/labcas-downloader.git
$ cd labcas-downloader
$ python3 -m venv venv
$ venv/bin/pip install --quiet --upgrade pip setuptools
$ venv/bin/pip install --editable '.[dev]'
```
Then, changes you make to files under `src` will be immediately reflected in `venv/bin/jpl-labcas-downloader` when run. `venv/bin` will also contain supporting development tools.


### 🔢 Versioning

We use the [SemVer](https://semver.org/) philosophy for versioning this software.


## 📃 License

The project is licensed under the [Apache version 2](LICENSE.md) license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EDRN/labcas-downloader",
    "name": "jpl.labcas.downloader",
    "maintainer": "Sean Kelly",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "sean.kelly@jpl.nasa.gov",
    "keywords": "laboratory, data, labcas, downloader, automation",
    "author": "Asitang Mishra",
    "author_email": "asitang.mishra@jpl.nasa.gov",
    "download_url": "https://files.pythonhosted.org/packages/49/d0/5812d7702ba1f8a5e517ef3fc1077522b6e316d8a27b121a3cf8ed36d6da/jpl_labcas_downloader-0.1.1.tar.gz",
    "platform": null,
    "description": "# \ud83d\udcc0\u00a0LabCAS Downloader\n\nThis is a simple downloader script for [LabCAS](https://edrn.nci.nih.gov/data-and-resources/informatics/labcas), the Laboratory Catalog and Archive System. This script enables you to \"bulk download\" data from a LabCAS installation such as\n\n-   [Early Detection Research Network's LabCAS](https://edrn-labcas.jpl.nasa.gov/)\n-   The [Consortium for Molecular and Cellular Characterization of Screen-Detected Lesions's LabCAS](https://mcl-labcas.jpl.nasa.gov/)\n-   Or any other LabCAS installation that supports the LabCAS API.\n\n\n## \ud83d\udda5\u00a0Prerequisites\n\nThis software works with Python 3.8, 3.9, or 3.10. Other versions may work but have not been tested.\n\n\n## \ud83d\udcbf\u00a0Installation\n\nTo install the LabCAS downloader, simply use the Python package installer, `pip`, i.e.:\n\n    pip install jpl.labcas.downloader\n\nYou'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):\n```console\n$ python3 -m venv venv\n$ cd venv\n$ bin/pip install jpl.labcas.downloader\n```\nThen use the `bin/jpl-labcas-downloader` program out of the `venv` directory.\n\n\n## \ud83d\udc81\u200d\u2640\ufe0f\u00a0Usage\n\nTo use the LabCAS Downloader, you'll need to have the following information at the ready:\n\n-   The **collection ID** or the **collection/dataset ID** of the data you want to download. For example, if you're after the entire Automated Quantitative Measures of Breast Density Data, use the collection ID `Automated_Quantitative_Measures_of_Breast_Density_Data`. However, if you want just the `C0250` dataset from that collection, use `Automated_Quantitative_Measures_of_Breast_Density_Data/C02520`. You can append more `/`s for nested datasets as needed.\n-   Your assigned LabCAS **username and the password** that authenticates your account.\n-   Lastly, the **API endpoint** you want to use:\n    -   For EDRN, that's `https://edrn-labcas.jpl.nasa.gov/data-access-api/`\n    -   For the Consortium for Molecular and Cellular Characterization of Screen-Detected Lesions, it's `https://edrn-labcas.jpl.nasa.gov/data-access-api/`\n\nThen, run the `jpl-labcas-downloader` as follows:\n\n    jpl-labcas-downloader --username USERNAME --api URL DATA-ID\n\nFor example, to download the `Automated_Quantitative_Measures_of_Breast_Density_Data` from the API at `https://edrn-labcas.jpl.nasa.gov/data-access-api/` using username `jane`, run:\n\n    jpl-labcas-downloader --username jane --api https://edrn-labcas.jpl.nasa.gov/data-access-api/ Automated_Quantitative_Measures_of_Breast_Density_Data\n\nYou'll be prompted for your password, and files will be written to the current directory.\n\n\n\ud83d\udc49 **Note:** Any existing files will be overwritten.\n\n\n### \ud83c\udfa8\u00a0Customization\n\nThe `jpl-labcas-downloader` supports several options as well as environment variables to customize its behavior.\n\n-   `--username USERNAME` tells the username to use to authenticate to the API. You can set the `LABCAS_USERNAME` environment variable to serve as a default. Leave this out to use no authentication.\n-   `--password PASSWORD` indicates the password to use, but **this is insecure** as password should not be put on command-lines. The `LABCAS_PASSWORD` can provide the default password. However, if neither the option nor the environment variable is given, you will be prompted for a password.\n-   `--api URL` tells the URL of the LabCAS API to query. It defaults to the `LABCAS_API_URL` environment variable. If neither is given, `https://edrn-labcas.jpl.nasa.gov/data-access-api/` is the fallback value.\n-   `--TARGET DIR` tells in what directory to write output files. It defaults to the current directory.\n\nYou can see all the options at a glance by running `jpl-labcas-downloader --help`.\n\n\n## \ud83d\udc65\u00a0Contributing\n\nWithin 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:\n\n-   Our [contributor's guide](https://github.com/EDRN/.github/blob/main/CONTRIBUTING.md) delineates the kinds of contributions we accept.\n-   Our [code of conduct](https://github.com/EDRN/.github/blob/main/CODE_OF_CONDUCT.md) outlines the standards of behavior we practice and expect by everyone who participates with our software.\n\n### \ud83d\udd27\u00a0Development\n\nIf you're a developer of this package, you'll probably do something like the following:\n```console\n$ git clone https://github.com/EDRN/labcas-downloader.git\n$ cd labcas-downloader\n$ python3 -m venv venv\n$ venv/bin/pip install --quiet --upgrade pip setuptools\n$ venv/bin/pip install --editable '.[dev]'\n```\nThen, changes you make to files under `src` will be immediately reflected in `venv/bin/jpl-labcas-downloader` when run. `venv/bin` will also contain supporting development tools.\n\n\n### \ud83d\udd22\u00a0Versioning\n\nWe use the [SemVer](https://semver.org/) philosophy for versioning this software.\n\n\n## \ud83d\udcc3\u00a0License\n\nThe project is licensed under the [Apache version 2](LICENSE.md) license.\n",
    "bugtrack_url": null,
    "license": "apache-2.0",
    "summary": "A simple Python package to download files from LabCAS",
    "version": "0.1.1",
    "project_urls": {
        "Download": "https://github.com/EDRN/labcas-downloader/releases/",
        "Homepage": "https://github.com/EDRN/labcas-downloader"
    },
    "split_keywords": [
        "laboratory",
        " data",
        " labcas",
        " downloader",
        " automation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85a05656c6f8dacdca7ae0521b70c39de7886c2dc9f00d6fef3e1ea569d73389",
                "md5": "4916e68ff232ba124d70694f76b38aa0",
                "sha256": "5720fb40d84324632a72acad92c7176471f7140a8d27328dfc6228f468a901af"
            },
            "downloads": -1,
            "filename": "jpl.labcas.downloader-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4916e68ff232ba124d70694f76b38aa0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 14341,
            "upload_time": "2025-01-03T21:36:16",
            "upload_time_iso_8601": "2025-01-03T21:36:16.322046Z",
            "url": "https://files.pythonhosted.org/packages/85/a0/5656c6f8dacdca7ae0521b70c39de7886c2dc9f00d6fef3e1ea569d73389/jpl.labcas.downloader-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49d05812d7702ba1f8a5e517ef3fc1077522b6e316d8a27b121a3cf8ed36d6da",
                "md5": "bf989fbcaced71ea2ba2e6c82ea1c29a",
                "sha256": "3452034f1f69e0d8a2ba5a2ae41bb9a07560f559a907ced59d4f70208f0db87f"
            },
            "downloads": -1,
            "filename": "jpl_labcas_downloader-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bf989fbcaced71ea2ba2e6c82ea1c29a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14799,
            "upload_time": "2025-01-03T21:36:18",
            "upload_time_iso_8601": "2025-01-03T21:36:18.569661Z",
            "url": "https://files.pythonhosted.org/packages/49/d0/5812d7702ba1f8a5e517ef3fc1077522b6e316d8a27b121a3cf8ed36d6da/jpl_labcas_downloader-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-03 21:36:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EDRN",
    "github_project": "labcas-downloader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jpl.labcas.downloader"
}
        
Elapsed time: 0.47817s