Skip to main content

firms-client

Async Python client for NASA FIRMS active-fire detections (MODIS since 2000, VIIRS since 2012): the open per-country archives, the near-real-time area API, and the parsing that tells a vegetation fire from a steelworks.

ci PyPI

One dependency: httpx.

Why a library

You might think What is true
the archive needs an Earthdata login and arrives by e-mail yearly CSVs per country are static and open: no account, no key
every satellite has a country archive modis (2000-) and viirs-snpp (2012-) do; viirs-noaa20 / noaa21 do not
high confidence means fire a steelworks is hot for real and comes through at high confidence
a confidence filter is enough only the type column says what burned: 0 vegetation, 1 volcano, 2 industry, 3 offshore
confidence is one format MODIS writes a 0-100 percentage, VIIRS l/n/h or low/nominal/high
a missing year is an empty file it is a 404 with a JSON body; an error with status 200 is caught too
a bad MAP_KEY returns JSON it is HTTP 400 with plain text Invalid MAP_KEY.

On Italy, about a quarter of the VIIRS detections are not vegetation fires. Without type == 0, the most "burnt" square kilometre in the country was the ILVA steelworks in Taranto, with 3,308 fire-days.

All checked against the live service on 3 November 2026.

Install

pip install firms-client

Use

The yearly archive of a country, no key needed:

import asyncio
from collections import Counter

import httpx

from firms_client import ARCHIVE_PRODUCTS, fetch_archive, select


async def main() -> None:
    async with httpx.AsyncClient(timeout=120) as client:
        for product in ARCHIVE_PRODUCTS:
            rows = await fetch_archive(client, product, 2025, "Italy")
            if rows is None:
                continue
            fires = select(rows)  # vegetation fires, nominal confidence or better
            print(
                product.slug,
                len(rows),
                "detections",
                dict(sorted(Counter(r.detection_type for r in rows).items())),
                "->",
                len(fires),
                "fires",
            )


asyncio.run(main())
modis 5076 detections {0: 3414, 1: 21, 2: 1635, 3: 6} -> 3315 fires
viirs-snpp 23349 detections {0: 17533, 1: 633, 2: 4277, 3: 906} -> 14880 fires

The archive runs up to the previous year or so; for recent days use the area API with a free MAP_KEY:

from firms_client import fetch_area, select

rows = await fetch_area(client, MAP_KEY, "VIIRS_SNPP_NRT", (6.0, 36.0, 19.0, 47.6), days=3)
fires = select(rows, min_frp_mw=1.0)

Selecting fires

select(rows, vegetation_only=True, min_confidence="nominal", min_confidence_pct=None, min_frp_mw=0.0):

  • vegetation_only drops volcanoes, industry and offshore (type 1-3); a row without type is kept, since it cannot be judged;
  • VIIRS rows are judged on their level; MODIS percentages on min_confidence_pct when given, otherwise mapped to levels with the FIRMS guidance (below 30 low, 30-79 nominal, 80+ high);
  • a missing confidence is kept: losing a real fire is worse than keeping a doubtful pixel.

Two things no filter fixes: crop-residue burning is a real vegetation fire (type 0), and FIRMS is presence-only, so no detection does not mean nothing burnt.

Bring your own HTTP

archive_url, area_url, is_hotspot_csv and parse_csv are pure.

Data

FIRMS data are provided by NASA LANCE / FIRMS and are free to use; please acknowledge "NASA FIRMS" in anything you publish. The test fixtures are a few rows of the 2025 Italian archives.

Extracted from Limen, which uses the archives as the fire history of Italy and the area API as a wildfire trigger.

Development

uv sync
make check

License

Code: Apache-2.0.

Metadata

Release files for firms-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for firms-client 0.1.0
File Size Uploaded Provenance Actions
firms_client-0.1.0.tar.gz 12.5 kB With provenance Details for firms_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for firms-client 0.1.0
File Interpreter ABI Platform Actions
firms_client-0.1.0-py3-none-any.whl Python 3 none any Details for firms_client-0.1.0-py3-none-any.whl

Total release size: 26.4 kB

Release files / firms_client-0.1.0.tar.gz

Download URL firms_client-0.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
abaaab69ff16a27337706869798efed20c5aeb0b84ba2d183bbb0300f56bd373
BLAKE2b-256 checksum
How to use checksums
8b9bf0f8b654e5c67cc572110f380134a7597511bcb6f0a683eaeec7887ac0e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / firms_client-0.1.0-py3-none-any.whl

Download URL firms_client-0.1.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
942a8272e4d511f4f7b3b29423c51cd73edbde965bb460cb53db2f984dd2714a
BLAKE2b-256 checksum
How to use checksums
ec5b6ff818e97c09615a6a223af70658c2920be243aa1430666d40a586319b10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for firms-client 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for firms_client-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page