This lightweight Python package allows users to query and download log data.
pip install ialirt-data-access
ialirt-data-access -h
Find all files from a given year, day of year, and instance
$ ialirt_data_access --url <url> ialirt-log-query --year <year> --doy <doy> --instance <instance>
Download a log and place in Downloads directory or optionally specify another local directory by appending --downloads_dir to the command
$ ialirt_data_access --url <url> ialirt-log-download ----filename <filename>
import ialirt_data_access
# Search for files
results = ialirt_data_access.query(year="2024", doy="045", instance="1")
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
.
If you encounter SSL errors similar to the following:
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.
-
Upgrade the certifi package
pip install --upgrade certifi
-
Install system certificates Depending on the Python version you installed the program with the command will look something like this:
/Applications/Python\ 3.10/Install\ Certificates.command
This could mean that the service is temporarily down. If you continue to encounter this, reach out to the IMAP SDC at [email protected].