Skip to main content

An async ready wrapper for the NASA Open API's

Project description

nasa.py

An easy to use, async ready wrapper for the NASA Open API's.

Key Features

  • Intuitive Syntax deriving from API Names
  • Proper Exception Handling
  • 100% coverage of each supported API

Installing

There are a few ways which you can install the Library. To install the stable version, simply run the following commands:

# Linux/macOS
python3 -m pip install -U nasa.py

# Windows
py -3 -m pip install -U nasa.py

To install the Library with its http speedups, simply run the same commands but with the following alterations:

# Linux/macOS
python3 -m pip install -U "nasa.py[speedups]"

# Windows
py -3 -m pip install -U nasa.py[speedups]

You can install the development version, you can do the following:

$ git clone https://github.com/quiktea/nasa.py
$ cd nasa.py
$ python3 -m pip install -U .[speedups]

Examples

All of the library's syntax is heavily inspired by the NASA Open API names. For example, to fetch the apod api, you can simply run the await .apod method.

Astronomy Picture of the Day (APOD)

from nasa import Client
client = Client("api_key") #providing an invalid api key or no api key will raise an Invalid API_KEY Error
apod_result = await client.apod()
video = apod_result.media.video
print(video)
print(video.url)

This will return:

>>> <Video url='https://www.youtube.com/embed/badXkJ6BnOs?rel=0'>
>>> https://www.youtube.com/embed/badXkJ6BnOs?rel=0

Getting an API Key

To get an API Key, simply visit the Nasa Open API website, fill out the form and get your api key!

API Key Generate Info

Currently Supported API's

  • APOD (Astronomy Picture of the Day)

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.py-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

nasa.py-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file nasa.py-0.1.0.tar.gz.

File metadata

  • Download URL: nasa.py-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for nasa.py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 acfec76c1cd9ad93595f8cbe42b691f144ebe76b9a2eeb8475f93cbb320b06f5
MD5 a4e55e6070170734b6886a79b882f423
BLAKE2b-256 1a8a02b4d5a025d95e1a9e1f3eb9b53bb0526a4af471a75b38ba75956b33ec72

See more details on using hashes here.

File details

Details for the file nasa.py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nasa.py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for nasa.py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e499b2a00de2f692e29205044b65e60d80c45ff2be919e8ec2c3d9de3ce39105
MD5 da8722efc6c156f5230b8b1e3677303e
BLAKE2b-256 0b70e1afc9df6ab988f19b60f96ffe43c8ec00dffd4ec3c109605607ac86fa6a

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