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.6.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.6-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mars_weather_api-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 067705f27368d3096975a8b156d411ab8b13a016cec9a6f6ad752cce47719496
MD5 d1c3d7429bb7dbeeeab9688bc0601d67
BLAKE2b-256 a710e057e5b03f8db84c248dd6778cc41173fba6f880e5c13197f3a2b8db528e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mars_weather_api-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5d034b37ea603be09c290f2629437010d1aa2fefd998e5b1d566656f7ecbd7f7
MD5 3c17001e53f6f5dc1f3b028dc0076217
BLAKE2b-256 311f23abc94e0f0e7e4c67f6db6feda9a0265729ea689b6f491d6bea06e6fbc2

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