Skip to main content

This is a wrapper for the NASA InSight API.

Project description

mars_weather_api

This is a Python wrapper for NASA's InSight Mars Weather Service API. It allows users to fetch and display weather data from Mars, including temperature details. Please note that the API can only access weather data for the last 7 sols (Martian days) that the InSight lander was active.

Usage

To use the mars_weather_api, first import the library and initialize it:

from mars_weather_api import MarsWeatherAPI

# Initialize the API wrapper
api = MarsWeatherAPI(api_key="your_nasa_api_key")

# Fetch and print weather data for the last 7 sols
api.print_week()

# Fetch and print weather data for a specific sol
api.print_day(day=3)

# Retrieve temperature data only
temps = api.get_temps_only()
print(temps)

Installation

$ python -m pip install mars_weather_api

Features

  • Fetch weather data for a specific sol (Martian day).
  • Retrieve weather data for the last 7 sols.
  • Extract temperature details (average, minimum, maximum) for each sol.
  • Easy-to-use Python interface with formatted output.

Requirements

  • Python 3.7 or higher
  • An active NASA API key (you can get one here).

Note

This is a school project and is not open for contributions.

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

mars_weather_api-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

mars_weather_api-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file mars_weather_api-0.1.1.tar.gz.

File metadata

  • Download URL: mars_weather_api-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.0a7

File hashes

Hashes for mars_weather_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 076e635a63ea77d7cd2a48cc369e9c360017ca4924965d47f6b4299eca3381b6
MD5 4c1d04cc733c69f4ffc5351f28b3bb08
BLAKE2b-256 159f552c092dc06ed1f5a427b8f713aa7efa05501043b242f52c8e99f5967e33

See more details on using hashes here.

File details

Details for the file mars_weather_api-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mars_weather_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a34cc553546ab25fcc8d82fd57da0f975fefbcd953337eefd12db8f4b61500c0
MD5 a2e1e06189cbda037138738878f2e999
BLAKE2b-256 284cec9552d6a499393cb25d19e13492f222082c53ab0c17041615f0eca5438e

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