IonoFlux Python SDK

Python 3.11+Synchronous clientPolyForm-Noncommercial-1.0.0

The official Python client for the IonoFlux API. It covers space weather, solar and geomagnetic data, alerts and public data metadata, and returns the API's original JSON.

pip install ionoflux

1. Create a Server key

Sign in on your account page and create a Server API key. Python runs outside the browser, so a Web key can return 403. Keep keys out of source control, browsers and shared notebook outputs.

The current key form asks for a service URL even for Server keys; for notebooks or batch jobs without a website, enter a service URL that fits the existing policy. The SDK cannot issue keys or bypass that requirement.

export IONOFLUX_API_KEY='your-server-key'

2. Quick start

from ionoflux import Client

with Client() as client:
    current = client.space_weather.current()
    print(current.data)  # Original JSON fields, including nulls and timestamp strings
    print(current.rate_limit.remaining)

Client() reads the key from IONOFLUX_API_KEY; Client(api_key="...") overrides it. sources() and data.status() need no key. Request datetimes must be timezone-aware and are sent as UTC.

from datetime import UTC, datetime
from ionoflux import Client, RateLimitError

with Client(timeout=10.0, max_retries=1) as client:
    try:
        series = client.solar.flux(
            start=datetime(2026, 10, 1, tzinfo=UTC),
            end=datetime(2026, 10, 2, tzinfo=UTC),
            interval="1h",
            limit=100,
        )
        print(series.data["unit"], series.data["attribution"])
    except RateLimitError as error:
        print(error.retry_after, error.rate_limit.reset_seconds)

Supported calls

Every call returns APIResponse with .data (the JSON), .raw_body, .status_code, .headers and .rate_limit. Time-series calls share start, end, interval and limit arguments.

client.space_weather.current()Current indicators and freshness
client.solar.flux(...)Solar flux index (SFI)
client.solar.sunspots(...)Sunspot number (source swpc or silso)
client.solar.xray(...)Solar X-ray flux (long or short band)
client.solar.wind(...)Solar wind speed, density, Bt or Bz
client.geomagnetic.kp(...)Kp index (source swpc or gfz, optional forecast)
client.geomagnetic.ap(...)Ap index
client.statistics(metric, ...)Summary statistics for a metric over a period
client.alerts.list(...)Space weather alerts (since, category, limit)
client.alerts.scales()NOAA R/S/G levels and outlook
client.sources()Public provider catalog and collector freshness (no key)
client.data.status(dataset=None)Public data status of a dataset (no key)

Scope and limits

This release does not provide async clients, pandas/DataFrame conversion, TEC/MUF maps, path predictions, stations or WSPR/PSK queries; those are future work. For path predictions and maps, call the REST API directly.

Only GET is implemented. Up to 3 retries (default 1) apply only to connection errors, timeouts and HTTP 502/503/504, and every retry can count against your daily quota of 1,000 requests. Redirects are never followed.

Details: API contract and limits · Changelog · Korean README

License and terms

The SDK code is licensed under the PolyForm Noncommercial License 1.0.0. It permits noncommercial use, including personal and hobby use and the educational, research and other institutional uses it lists. Commercial use outside those permissions requires a separate written license; it is not an OSI open-source license.

When you redistribute the SDK, keep the license terms and the Required Notice from NOTICE:

Required Notice: IonoFlux (https://ionoflux.runvia.app)

The SDK license covers the code only. API access, attribution of API results and the original providers' data licenses are separate; please keep each response's source and attribution.