pyspaceweather
pyspaceweather is a Python wrapper for the Australian Bureau of Metererology's Space Weather API.
The API provides access to near real-time data from the BOM's Australian Space Weather Forecasting Centre.
Installation
pip install pyspaceweather
Usage
An API key, which you can get from the BOM, is required to use the API:
import os
from pyspaceweather import SpaceWeather
sw = SpaceWeather(os.environ["SPACEWEATHER_API_KEY"])
Each API request method is available as a method of SpaceWeather.
For example, to get details of any magnetic alert current for the Australian region.
alert_warnings = sw.get_mag_alert()
What's returned is a list of MagAlert objects:
[MagAlert(start_time=datetime.datetime(2015, 2, 7, 8, 45),
valid_until=datetime.datetime(2015, 2, 7, 20, 45),
g_scale=1,
description='minor')
]
Or, to get historical A-index values, you can call get_a_index(), passing a string or datetime object to the relevant parameters:
a_index_data = sw.get_a_index(start="2023-01-01 00:00:00", end=datetime(2023, 12, 1, 12, 30))
Documentation
You can read documentation for this wrapper at ReadTheDocs.
Metadata
Release files for pyspaceweather 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyspaceweather-0.1.0.tar.gz | 10.1 kB | Without provenance | Details for pyspaceweather-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyspaceweather-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyspaceweather-0.1.0-py3-none-any.whl |
Total release size: 17.9 kB
Release files / pyspaceweather-0.1.0.tar.gz
| Download URL | pyspaceweather-0.1.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
460015ac26e46cd6a9db3a3de0a0e778a4522b39745ecbf1afb9df0e1256b0c7
|
|
BLAKE2b-256 checksum How to use checksums |
f29152d907136d6ea77d8d89006f65c5f51327dc1f80e2e13ee02ddb4c6776f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / pyspaceweather-0.1.0-py3-none-any.whl
| Download URL | pyspaceweather-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1410d2ef7bab628e40a968498476ed65d75c63dab3322464565187a9c2da7bbf
|
|
BLAKE2b-256 checksum How to use checksums |
309759ef118d7da22983d91853c937916ee4a76915a88616b2da92f461266743
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for pyspaceweather 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.