Skip to main content

Himawari-8/9 downloader and file query SDK for FTP and S3.

Project description

himawari-downloader

himawari-downloader is a Python SDK and CLI for querying and downloading Himawari-8/9 data from FTP and S3.

Features

  • Unified HimawariDownloader API
  • Query modes: find, latest, closest, previous, next
  • Download modes: links, timestamps, dates, range
  • FTP support for netcdf and hsd
  • FTP NetCDF remote bbox and variable subset download
  • S3 file query and raw download
  • Optional proxy support for FTP and S3

Installation

Base install:

pip install himawari-downloader

Install S3 support:

pip install "himawari-downloader[s3]"

Install FTP NetCDF subset support:

pip install "himawari-downloader[ftp-netcdf]"

Install everything:

pip install "himawari-downloader[all]"

For local development:

pip install -e ".[dev]"

Python usage

Basic FTP HSD download:

from himawari_downloader import DownloadParams, HimawariDownloader, QueryParams

client = HimawariDownloader(ftp_user="your_uid", ftp_password="your_password")

query = QueryParams(
    source="ftp",
    satellite="H09",
    product_level="L1B",
    product="Rad",
    sector="FLDK",
    mode="dates",
    data_format="hsd",
    dates=("2025-03-19",),
    bands=("B07", "B14"),
)

result = client.download(query, DownloadParams(out_dir="data/out"))
print(result.saved_paths)

FTP NetCDF subset example:

from himawari_downloader import DownloadParams, HimawariDownloader, NetcdfSubset, QueryParams

client = HimawariDownloader(ftp_user="your_uid", ftp_password="your_password")

query = QueryParams(
    source="ftp",
    satellite="H09",
    product_level="L2",
    product="NetCDF",
    sector="FLDK",
    mode="links",
    data_format="netcdf",
    remote_files=("/jma/netcdf/202503/19/NC_H09_20250319_0010_R21_FLDK.02401_02401.nc",),
)

result = client.download(
    query,
    DownloadParams(
        out_dir="data/out",
        netcdf_subset=NetcdfSubset(
            bbox_lat=(40.75, 34.44),
            bbox_lon=(110.27, 114.59),
            target_vars=("tbb_07",),
        ),
    ),
)

Proxy example:

from himawari_downloader import DownloadParams, ProxyConfig

params = DownloadParams(
    out_dir="data/out",
    proxy=ProxyConfig(
        url="http://127.0.0.1:7890",
        source_overrides={"s3": "http://127.0.0.1:7890"},
    ),
)

CLI

himawari-download find \
  --source ftp \
  --satellite H09 \
  --product-level L1B \
  --product Rad \
  --sector FLDK \
  --mode dates \
  --data-format hsd \
  --dates 2025-03-19

Test

python -m pytest -q

Build

python -m build
python -m twine check dist/*

Release

GitHub repository:

  • https://github.com/P-Coke/himawari-downloader

PyPI publishing is configured through GitHub Actions trusted publishing.

To release:

  1. Push changes to main
  2. Create and push a version tag like v0.1.0
  3. GitHub Actions will build and publish to PyPI

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

himawari_downloader-0.1.0.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

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

himawari_downloader-0.1.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file himawari_downloader-0.1.0.tar.gz.

File metadata

  • Download URL: himawari_downloader-0.1.0.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for himawari_downloader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4cc3c84ce23e7a1e981833c0ad8c36f0190cbb5a3a14e687f081da906a05f6d0
MD5 c85ba476cc16251d1b22f0fd267f4719
BLAKE2b-256 8aa0b922d49beb4a70f6b1c28b464817923eeca8f444324def5b2d9408c30f67

See more details on using hashes here.

Provenance

The following attestation bundles were made for himawari_downloader-0.1.0.tar.gz:

Publisher: publish-pypi.yml on P-Coke/himawari-downloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file himawari_downloader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for himawari_downloader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6933673b13c1eef35323ffab44f0ec0fbabc402688d3cb1713b7975fd340282
MD5 0797d4ef1115649f57b7a5ea3314d3a9
BLAKE2b-256 0fa86e071ecb64011d5ee5b57155706f5beeb9e16a4467811a789f3bb450448c

See more details on using hashes here.

Provenance

The following attestation bundles were made for himawari_downloader-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on P-Coke/himawari-downloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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