Skip to main content

Downloader for ISMR Query Tool (RINEX, ISMR, 1min-ISMR, SBF)

Project description

ISMR Downloader

A Python tool for downloading GNSS/ISMR (Ionospheric Scintillation Monitoring Receiver) data from the ISMR Query Tool API. It supports multiple data types, automatic token management, rate limiting, logging, progress bars, automatic date normalization, and chunk-based downloads for large time intervals.


Requirements

⚠ We recommend following Conventional Commits (cheatsheet) when contributing.


Getting started

  • Clone the repository
git clone git@github.com:GEGE-UNESP/ismr_downloader.git
  • Create a virtual environment

Windows (PowerShell)

python -m venv .venv
.venv\Scripts\Activate.ps1

Linux/Mac

python3 -m venv .venv
source .venv/bin/activate
  • Create a .env file

Windows

type .env.example > .env

Linux/Mac

cp .env.example .env

Fill in your API credentials and settings inside .env:

ISMR_EMAIL=your_email@example.com
ISMR_PASSWORD=your_password

# Data type: ismr | ismr1min | sbf | rinex
DATA_TYPE=ismr

ISMR_STATIONS=PRU2,MOR3

# When only a date is provided (YYYY-MM-DD),
# the downloader automatically expands:
#   start → 00:00:00
#   end   → 23:59:59
ISMR_START=2025-11-17
ISMR_END=2025-11-17
  • Install dependencies
pip install -r requirements.txt
  • Run the project
python -m ismr_downloader

From prebuilt binary (Windows)

If you downloaded the .exe from the Releases page, just place it in the same folder as your .env file and run:

ismr_downloader.exe -f -e .env
  • This avoids the need for Python or pip installation.
  • Token caching, date normalization, chunking, and logs all work the same as in the Python version.

⚠ Make sure your .exe file has the same structure as the example.


Date & Time Handling (UTC)

The downloader includes automatic datetime normalization:

  • If you provide a full ISO timestamp:
2025-11-17T05:30:00

It is used exactly as written.

  • If you provide only a date:
2025-11-17

It is expanded automatically to the full-day range:

Field Value assigned
Start 2025-11-17 00:00:00
End 2025-11-17 23:59:59

This ensures correct, full-day coverage without manual timestamps.


Chunked Download Strategy

The downloader automatically splits large date ranges into smaller chunks based on max_days:

  • Prevents oversized API queries
  • Improves reliability for long time spans
  • Ensures the server returns complete data

Example: If max_days=15 and your range covers 90 days, it will automatically generate 6 chunks.


Token Management

  • API tokens are cached in .token.json
  • Valid tokens are reused between runs
  • Expired tokens are refreshed automatically
  • Thread safety prevents race conditions during renewal

Error Handling & Retries

The downloader includes robust handling for:

Status Action
401 Refresh token and retry
404 Logs a "no data" entry into a CSV
429 Automatic backoff with safe stop after repeated failures
503 Clean shutdown with clear maintenance message
Timeouts Retries with delay

Any interval without data is recorded into:

logs/no_data_YYYYMMDD_HHMMSS.csv

Logs

All run logs are saved under the logs/ folder with a timestamp:

  • run_YYYYMMDD_HHMMSS.log → detailed logs
  • downloaded_files_YYYYMMDD_HHMMSS.txt → list of downloaded/skipped files
  • no_data_YYYYMMDD_HHMMSS.csv → intervals where the API returned no data

Progress bars are shown for each file download.


Notes

  • Default download folder is downloads/.
  • The downloader automatically enforces request pacing via a built-in rate limiter.
  • The tool supports both bundle and temp_urls modes from the API.
  • The maximum query range is automatically chunked according to max_days.
  • Progress bars appear for every downloaded file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ismr_downloader-0.1.4.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ismr_downloader-0.1.4-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file ismr_downloader-0.1.4.tar.gz.

File metadata

  • Download URL: ismr_downloader-0.1.4.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for ismr_downloader-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9fad6a2d45366a6c6409ac8eef74eea2a97824a2d195c7bd3dbd122d44402c55
MD5 7754daa0762019d28e26ac6730840aaa
BLAKE2b-256 d774e202fbf9841492fc0587041d3cef7623226bbccc28c45975e90a55c34e9d

See more details on using hashes here.

File details

Details for the file ismr_downloader-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ismr_downloader-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 31eae955db653464bb5803a9462f9ede143142b9fc67042a2ed8bc06a4c1ba23
MD5 d42c33cfcb3d77045c4b3ae4eb7d7446
BLAKE2b-256 6f944fbea8877185bba2e649dfbf69858c29dae6ad3bc8b67bda4ea4f24d9225

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page