# I-ALiRT Data Access Package
This lightweight Python package allows users to query and download log data.
## Command Line Utility
### To install
```bash
pip install ialirt-data-access
ialirt-data-access -h
```
### Query / Search for logs
Find all files from a given year, day of year, and instance
```bash
$ ialirt_data_access --url <url> ialirt-log-query --year <year> --doy <doy> --instance <instance>
```
### Download logs
Download a log and place in Downloads directory or optionally specify another local directory by appending --downloads_dir <directory> to the command
```bash
$ ialirt_data_access --url <url> ialirt-log-download ----filename <filename>
```
## Importing as a package
```python
import ialirt_data_access
# Search for files
results = ialirt_data_access.query(year="2024", doy="045", instance="1")
```
## Configuration
### Data Access URL
To change the default URL that the package accesses, you can set
the environment variable ``IALIRT_DATA_ACCESS_URL`` or within the
package ``ialirt_data_access.config["DATA_ACCESS_URL"]``. The default
is the development server ``https://ialirt.dev.imap-mission.com``.
## Troubleshooting
### Network issues
#### SSL
If you encounter SSL errors similar to the following:
```text
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
```
That generally means the Python environment you're using is not finding your system's root
certificates properly. This means you need to tell Python how to find those certificates
with the following potential solutions.
1. **Upgrade the certifi package**
```bash
pip install --upgrade certifi
```
2. **Install system certificates**
Depending on the Python version you installed the program with the command will look something like this:
```bash
/Applications/Python\ 3.10/Install\ Certificates.command
```
#### HTTP Error 502: Bad Gateway
This could mean that the service is temporarily down. If you
continue to encounter this, reach out to the IMAP SDC at
<imap-sdc@lasp.colorado.edu>.
Raw data
{
"_id": null,
"home_page": null,
"name": "ialirt-data-access",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": "IMAP, SDC, SOC, SDS, Science Operations",
"author": "IMAP SDC Developers",
"author_email": "imap-sdc@lists.lasp.colorado.edu",
"download_url": "https://files.pythonhosted.org/packages/43/fa/49109aff08d4154c91def6764903c6f05233e083db5c56f629acfcc1aac4/ialirt_data_access-0.1.0.tar.gz",
"platform": null,
"description": "# I-ALiRT Data Access Package\n\nThis lightweight Python package allows users to query and download log data.\n\n## Command Line Utility\n\n### To install\n\n```bash\npip install ialirt-data-access\nialirt-data-access -h\n```\n\n### Query / Search for logs\n\nFind all files from a given year, day of year, and instance\n\n```bash\n$ ialirt_data_access --url <url> ialirt-log-query --year <year> --doy <doy> --instance <instance>\n```\n\n### Download logs\n\nDownload a log and place in Downloads directory or optionally specify another local directory by appending --downloads_dir <directory> to the command\n\n```bash\n$ ialirt_data_access --url <url> ialirt-log-download ----filename <filename>\n```\n\n## Importing as a package\n\n```python\nimport ialirt_data_access\n\n# Search for files\nresults = ialirt_data_access.query(year=\"2024\", doy=\"045\", instance=\"1\")\n```\n\n## Configuration\n\n### Data Access URL\n\nTo change the default URL that the package accesses, you can set\nthe environment variable ``IALIRT_DATA_ACCESS_URL`` or within the\npackage ``ialirt_data_access.config[\"DATA_ACCESS_URL\"]``. The default\nis the development server ``https://ialirt.dev.imap-mission.com``.\n\n## Troubleshooting\n\n### Network issues\n\n#### SSL\n\nIf you encounter SSL errors similar to the following:\n\n```text\nurllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>\n```\n\nThat generally means the Python environment you're using is not finding your system's root\ncertificates properly. This means you need to tell Python how to find those certificates\nwith the following potential solutions.\n\n1. **Upgrade the certifi package**\n\n ```bash\n pip install --upgrade certifi\n ```\n\n2. **Install system certificates**\n Depending on the Python version you installed the program with the command will look something like this:\n\n ```bash\n /Applications/Python\\ 3.10/Install\\ Certificates.command\n ```\n\n#### HTTP Error 502: Bad Gateway\n\nThis could mean that the service is temporarily down. If you\ncontinue to encounter this, reach out to the IMAP SDC at\n<imap-sdc@lasp.colorado.edu>.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "I-ALiRT Data Access",
"version": "0.1.0",
"project_urls": {
"homepage": "https://github.com/IMAP-Science-Operations-Center"
},
"split_keywords": [
"imap",
" sdc",
" soc",
" sds",
" science operations"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43fa49109aff08d4154c91def6764903c6f05233e083db5c56f629acfcc1aac4",
"md5": "89e45fb8725acc28a4634544935b29a0",
"sha256": "49208a42d5bf623e83e7c30459320133ac60eae3afeaeb778f4984ba3f6a75c7"
},
"downloads": -1,
"filename": "ialirt_data_access-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "89e45fb8725acc28a4634544935b29a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 5703,
"upload_time": "2025-01-06T23:06:21",
"upload_time_iso_8601": "2025-01-06T23:06:21.088160Z",
"url": "https://files.pythonhosted.org/packages/43/fa/49109aff08d4154c91def6764903c6f05233e083db5c56f629acfcc1aac4/ialirt_data_access-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-06 23:06:21",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ialirt-data-access"
}