Skip to main content

An API Wrapper for the Nasa API

Project description

NASA-API

nasa-api is an async wrapper for The Official NASA API.

Note: Currently in development.

Make sure to generate an API key from https://api.nasa.gov/

Available APIs

APOD

Stands for Astronomy Picture of the Day.

import nasa
import asyncio

async def main():
    response = await nasa.APOD().apod('API-KEY-HERE', **kwargs)   
    print(response)

asyncio.get_event_loop().run_until_complete(main())

Parameters:

Parameter Type Example Description
date str "YYYY-MM-DD", "2021-06-11" The date of the APOD image to retrieve
date_range str "START_DATE, END_DATE", "YYYY-MM-DD, YYYY-MM-DD", "2021-06-11, 2021-07-30" A date range, when requesting date for a range of dates. Cannot be used with date.
count int 1 If this is specified then count randomly chosen images will be returned. Cannot be used with date or date_range.
thumbs str "True", "False" Return the URL of video thumbnail. If an APOD is not a video, this parameter is ignored.
api_key str "DEMO_KEY" a api.nasa.gov key. This is a positional argument

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

nasa-api-0.0.2.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file nasa-api-0.0.2.tar.gz.

File metadata

  • Download URL: nasa-api-0.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for nasa-api-0.0.2.tar.gz
Algorithm Hash digest
SHA256 153f51c2aad48b3197f107f3edf1f827577a9bfb51d88ac27c5114b7da4af4a5
MD5 64b69388d098468a86267a50dc3b4ef0
BLAKE2b-256 ce045617d7e874495d4a5d0447d31d2abeb398c9df31233ee82ae208d171d1c1

See more details on using hashes here.

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