Skip to main content

A package for querying NASA's FIRMS

Project description

pyNASAFIRMS

License: GNU AGPL v3Contributor Covenant: v2.1 adoptedPython versions: >= 3.7

Слава Україні:ukraine:/Slava Ukraini :ukraine:!

Fuck :russia:

pyNASAFIRMS is a wrapper for NASA's FIRMS API. Covers all the endpoints that FIRMS supports as of 08/22/2022.

Requirements

This requires Python >= 3.7. In reality it likely works on more but this is what it was developed with.

Packages required:

  • requests

Quick Start

First off, you NEED to get a 'map key' from NASA to query the API: Get it here.

At the bottom of the page, theres a 'Map Key' section. Click the 'Get MAP_KEY' button.

Once you have a map key, you can set an environment variable FIRMS_MAP_KEY to equal the map key provided by NASA. Otherwise, you can pass a map key to the NasaFirms object via the NasaFirms.map_key attribute.

import pynasafirms
client = pynasafirms.NasaFirms(map_key='xxxxxxxxxx')
resp = client.get_country_modis_nrt('UKR')
print(resp[0].longitude)
....
29.24976

The above code queries the FIRMS 'country' endpoint with the country code 'UKR' (Ukraine) and the MODIS_NRT sensor. It also has a default parameter for the 'start_date' to be queried. If a date isn't specified, the current local date is used in YYYY-MM-DD and passed to the endpoint. The 'days' defaults 1 unless specified. The FIRMS endpoints only allow for up to 10 days, but this isn't enforced in the wrapper(yet). After the query returns, a list of 'Country' objects are returned.

Info on the NASA FIRMS api here.

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

pynasafirms-0.0.1.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

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

pynasafirms-0.0.1-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file pynasafirms-0.0.1.tar.gz.

File metadata

  • Download URL: pynasafirms-0.0.1.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pynasafirms-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c160bc05ec3be72ec7cd34f06173dd356adb305afaea96c0544c0cdef24ec34a
MD5 e359f35a83be5acd6aaac2f7811ce29a
BLAKE2b-256 a30a5d78df65f74a5748d75d5653560559b0d5444496c15d496b1afc0bda783f

See more details on using hashes here.

File details

Details for the file pynasafirms-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pynasafirms-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pynasafirms-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7452eb8d6c0936de91bb8410b4605d272b89c9919cfbdbbcdbd1ba8bd7543061
MD5 2483126c92f788e4bc585b752fd50a98
BLAKE2b-256 33637de8ea2082431836d93211637fd2ff71dc9e01dfc4e4fe762c663dbc40d8

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