Skip to main content

An async python wrapper for NASA open APIs.

Project description

aionasa

An async python wrapper for NASA open APIs. (api.nasa.gov)

Disclaimer

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

Current Progress: 5/17 APIs

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

Installing

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 https://github.com/nwunderly/aionasa
$ cd aionasa
$ python3 -m pip install -U .

Quickstart

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.

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.2.1.tar.gz (17.9 kB view hashes)

Uploaded Source

Built Distribution

aionasa-0.2.1-py3-none-any.whl (24.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page