Skip to main content

An async python wrapper for NASA open APIs.

Project description


An async python wrapper for NASA open APIs. (


This module is still in the development/testing phase. Bugs are still being worked out and breaking changes are common.

Current Progress: 2/17 APIs

  • APOD: NASA Astronomy Picture of the Day
    • API: complete
    • CLI: complete
    • Documentation: complete
  • InSight: Mars Weather Data
    • API: complete
    • Documentaion: complete
  • Exoplanet: NASA Exoplanet Database
    • API: incomplete
  • Asteroids-NeoWs: Near Earth Object Web Service
    • API: incomplete


aionasa can be installed from pypi with the command:

# Linux
python3 -m pip install -U aionasa

# Windows
python -m pip install -U aionasa

To install the development version of the library directly from source:

$ git clone
$ cd aionasa
$ python3 -m pip install -U .


We'll be using IPython because it supports await expressions directly from the console.

$ pip install aionasa ipython
$ ipython
from aionasa import APOD, InSight

async with APOD() as apod:
    picture = await apod.get()

picture.url # this will be the most recent APOD image URL.

async with InSight() as insight:
    data = await insight.get()

data # this will be a dict containing the JSON data returned by the API.

Python Script Example - APOD

This is a simple script that will return the title, explanation, and url from the most recent Astronomy Picture of the Day page, then download and save the image.

import asyncio
from aionasa import APOD

async def main():
    async with APOD() as apod:
        apod_entry = await apod.get()

CLI Example - APOD

This command, like the above python script, will print data returned by the APOD API, then download and save the image.

python3 -m aionasa.apod --print --download .


I'd love to hear any feedback on this project so far. It's early in development so the library's design is still being worked out. Any design ideas or feature requests would be very helpful.

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

aionasa-0.1.2.tar.gz (12.3 kB view hashes)

Uploaded source

Built Distribution

aionasa-0.1.2-py3-none-any.whl (15.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page