all-in-one wrapper for NASA API's

Overview

Screenshot

PyPI version Downloads Status Build Status

===========

About

bowshock is an all-in-one wrapper for NASA API's. Here is a list of currently supported API's :

Install

Standart Procedure

pip install bowshock

Important Note: The only requirement is the 'requests' package BUT if you want to use MODIS there is an external requirement which is 'suds' package

Do i need an API Key ?

YES NO
Earth The rest
APOD
Patents
Earth Temperature Anomalies

The rest does not require an API key for usage. Get your NASA API KEY from : https://data.nasa.gov/developer/external/planetary/#apply-for-an-api-key

Setting up the API Key

=================== set an environment varible NASA_API_KEY which is equal to your key string

Usage

Apod
from bowshock import apod

# with specific date and tags - For apod all args are optional
apod.apod(date="2015-02-02", concept_tags=True)
Asterank
from bowshock import asterank

# all args mandatory
asterank.asterank(
            	query={"e": {"$lt": 0.1},
               	       "i": {"$lt": 4},
                       "a": {"$lt": 1.5}},
                  limit=1)
Earth
from bowshock import earth

# imagery endpoint lon & lat mandatory, rest optional
earth.imagery(lon=100.75,
                    lat=1.6,
                    dim=0.0025,
                    date="2015-02-02",
                    cloud_score=True)
# assets endpoint lon & lat & begin mandatory, end optional
earth.assets(lon=100.75, lat=1.6, begin="2015-02-02", end="2015-02-10")
HelioViewer
from bowshock import helioviewer

# args are mandatory
helioviewer.getjp2image(date='2014-01-01T23:59:59', sourceId=14)
#args are mandatory
helioviewer.getjp2header(Id=7654321)
MAAS
from bowshock import maas

# mandatory date begin / end
maas.maas_archive('2012-10-01', '2012-10-31')

maas.maas_latest()
Patents
from bowshock import patents

# only query is mandatory, rest is optional
patents.patents(query="temperature", concept_tags=True, limit=5)
PredictTheSky
from bowshock import predictthesky

#args are mandatory
predictthesky.space_events(lon=100.75, lat=1.5)
Star API
from bowshock import star

star.stars()
star.search_star("Sun")

star.exoplanets()
star.search_exoplanet("11 Com")

star.local_group_of_galaxies()
star.search_local_galaxies("IC 10")

star.star_clusters()
star.search_star_cluster("Berkeley 59")
Skymorph
from bowshock import skymorph

# mandatory obj id
skymorph.search_target_obj("J99TS7A")

#TODO : add search_position() , search_target_obj()
temperature anomalies
from bowshock import temperature_anomalies

# end arg is optional, rest is mandatory
temperature_anomalies.coordinate(lon=100.3, lat=1.6, begin="1990", end="2005")
techport
from bowshock import techport

techport.techport(Id="4795")

Contributors


TODO

BTW What is "bowshock"?

Screenshot

Comments
  • Adjust for pytest and add pkg to tests

    Adjust for pytest and add pkg to tests

    This PR implements a few changes that make running the test suite with py.test a cinch:

    1. Test file names were all changed to test_*.py
    2. Test files adjusted to add the package to the PATH (sys.path.append("../bowshock/"))
    3. The __init__.py file handles all the import statements

    Here are the tweaks in action on a vanilla Precise32 box (though I didn't record ALL of the tests running haha):

    bowshock

    opened by danwagnerco 6
  • Ensure dim param is appended to url if specified

    Ensure dim param is appended to url if specified

    This slight adjustment will fix #4.

    HOWEVER, I suggest NOT merging this into the master branch just yet. It seems that the dim parameter causes some kind of error in the API endpoint:

    $ curl "http://api.data.gov/nasa/planetary/earth/imagery?lon=100.75&lat=1.5&date=2015-07-04&cloud_score=True&api_key=DEMO_KEY"
    {"date": "2015-06-15T03:28:16", "url": "https://earthengine.googleapis.com/api/thumb?thumbid=4c3e852191f53f5653732b91feae7efd&token=d9967e5c873d725ba22f4314728a63ab", "cloud_score": 1.0, "id": "LC8_L1T_TOA/LC81270592015166LGN00"}
    

    Compare the nice output from above to the nasty output below (when the dim parameter is included):

    $ curl "http://api.data.gov/nasa/planetary/earth/imagery?lon=100.75&lat=1.5&dim=0.025&date=2015-07-04&cloud_score=True&api_key=DEMO_KEY"
    {"message": "Admins have been notified.", "error": "unsupported operand type(s) for /: 'unicode' and 'int'"}
    

    Argh -- that does not look good!

    On the NASA API page, they list Jason Duley ([email protected]) as the contact. Should we reach out to Jason to see if we have uncovered a bug in this endpoint?

    opened by danwagnerco 3
  • Can't run test suite

    Can't run test suite

    Cool project!

    I wanted to kick the tires a bit, but I'm having a really hard time running the test suite. With Python 3.4.1 (via Anaconda) on Windows 8.1, I get an ImportError on the helpers module.

    image

    Figured I was being dumb or it was a Windows problem, so I spun up Vagrant's Precise32 box (Python 2.7.3) to give it a whirl. Unfortunately, that blamed bowshock.

    image

    Can you tell what I'm doing wrong?

    Thanks! Dan

    opened by danwagnerco 2
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 1
  • Point NASA API links to documentation

    Point NASA API links to documentation

    Small change introduced with this PR. It seems that the NASA documentation for the Earth, APOD, Patents and Earth Temperature Anomalies APIs has changed -- the updated links point to NASA's examples.

    opened by danwagnerco 1
  • Adjust for pytest and add pkg to tests

    Adjust for pytest and add pkg to tests

    This PR implements a few changes that make running the test suite with py.test a cinch:

    1. Test file names were all changed to test_*.py
    2. Test files adjusted to add the package to the PATH (sys.path.append("../bowshock/"))
    3. The __init__.py file handles all the import statements

    Here are the tweaks in action on a vanilla Precise32 box (though I didn't record ALL of the tests running haha):

    bowshock

    opened by danwagnerco 1
  • Typo in the address method for the temperature_anomalies module

    Typo in the address method for the temperature_anomalies module

    It looks like there was a small mistake in the definition of the adress method:

    https://github.com/emirozer/bowshock/blob/master/bowshock/temperature_anomalies.py#L12

    This results in a 404:

    image

    By converting from adress to address (two ds), the server response is as expected (even though I can't quite figure out how to form addresses for success haha):

    image

    opened by danwagnerco 0
  • In the earth#imagery method, `dim` parameter is not added to the URL

    In the earth#imagery method, `dim` parameter is not added to the URL

    When using earth.imagery, the dim parameter is not added to the URL even if it is specified.

    >>> from bowshock import earth
    >>> lon = 100.75
    >>> lat = 1.5
    >>> dim = 0.025
    >>> date = "2015-07-04"
    >>> cloud_score = True
    >>> r_without_dim = earth.imagery(lon=lon, lat=lat, date=date, cloud_score=cloud_score)
    # ... print stuff
    >>> r_with_dim = earth.imagery(lon=lon, lat=lat, dim=dim, date=date, cloud_score=cloud_score)
    # ... print stuff
    >>> r_without_dim.url == r.with_dim.url
    True
    

    (here's a screenshot of the above in action)

    image

    It looks like this issue comes from a mised += in the earth module:

    https://github.com/emirozer/bowshock/blob/master/bowshock/earth.py#L61

    opened by danwagnerco 0
  • maas.py - Migrate API to Mars weather data from APSS instrument (Auxiliary Payload Subsystem) on InSight Rover

    maas.py - Migrate API to Mars weather data from APSS instrument (Auxiliary Payload Subsystem) on InSight Rover

    Since ingenology/MAAS isn't available anymore, use the more precise Mars InSight Mission weather API. https://mars.nasa.gov/insight/weather/ https://github.com/gablau/mars-insight-weather-node https://mars.nasa.gov/rss/api/?feed=weather&category=insight&feedtype=json&ver=1.0

    opened by Strykar 0
Owner
Emir Ozer
polyglot programmer & distributed systems engineer.
Emir Ozer
Python CMR is an easy to use wrapper to the NASA EOSDIS Common Metadata Repository API.

This repository is a copy of jddeal/python_cmr which is no longer maintained. It has been copied here with the permission of the original author for t

NASA 9 Nov 16, 2022
szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szsupunma 93 Jan 7, 2023
Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs.

Twython Twython is a Python library providing an easy way to access Twitter data. Supports Python 3. It's been battle tested by companies, educational

Ryan McGrath 1.9k Jan 2, 2023
Python wrapper for the Sportradar APIs ⚽️🏈

Sportradar APIs This is a Python wrapper for the sports APIs provided by Sportradar. You'll need to sign up for an API key to use the service. Sportra

John W. Miller 39 Jan 1, 2023
Python wrapper for Coinex APIs

coinexpy - Python wrapper for Coinex APIs Through coinexpy you can simply buy or sell crypto in your Coinex account Features place limit order place m

Iman Mousaei 16 Jan 2, 2023
A Python script that exports users from one Telegram group to another using one or more concurrent user bots.

ExportTelegramUsers A Python script that exports users from one Telegram group to another using one or more concurrent user bots. Make sure to set all

Fasil Minale 17 Jun 26, 2022
Python wrapper for Xeno-canto API 2.0. Enables downloading bird data with one command line

Python wrapper for Xeno-canto API 2.0. Enables downloading bird data with one command line. Supports multithreading

_zza 9 Dec 10, 2022
This Wrapper is a Discum Copy With Addons, original one is made by Merubokkusu

Remaded Discum Its not Official Discum Wrapper ! This Wrapper is a Discum Copy With Addons, original one is made by Merubokkusu Authors @merubokkusu (

discum-remaded 8 Aug 9, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
A wrapper for slurm especially on Taiwania2 (HPC CLI)A wrapper for slurm especially on Taiwania2 (HPC CLI)

TWCC-slurm-wrapper A wrapper for slurm especially on Taiwania2 (HPC CLI). For Taiwania2 (HPC CLI) usage, please refer to here. (中文) How to Install? gi

Chi-Liang, Liu 5 Oct 7, 2022
Discord-Wrapper - Discord Websocket Wrapper in python

This does not currently work and is in development Discord Websocket Wrapper in

null 3 Oct 25, 2022
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

null 1 May 20, 2022
One destination for all the developer's learning resources.

DevResources One destination for all the developer's learning resources. Find all of your learning resources under one roof and add your own. Live ✨ Y

Gaurav Sharma 33 Oct 21, 2022
All in one Search Engine Scrapper for used by API or Python Module. It's Free!

All in one Search Engine Scrapper for used by API or Python Module. How to use: Video Documentation Senginta is All in one Search Engine Scrapper. Wit

null 33 Nov 21, 2022
A Script to automate fowarding all new messages from one/many channel(s) to another channel(s), without the forwarded tag.

Channel Auto Message Forward A script to automate fowarding all new messages from one/many channel(s) to another channel(s), without the forwarded tag

null 16 Oct 21, 2022
An all-in-one discord bot!

Interbot Interbot is a do-it-all bot originally made for the Interbyte Studios discord server. This repo contains the code for this bot, allowing you

Logan 5 Aug 3, 2021
A python based all-in-one tool for Google Drive

gdrive-tools A python based all-in-one tool for Google Drive Uses For Gdrive-Tools ✓ generate SA ✓ Add the SA and Add them to TD automatically ✓ Gener

XcodersHub 32 Feb 9, 2022
An Open Source ALL-In-One Telegram RoBot, that can do lot of things.

An Open Source ALL-In-One Telegram RoBot, that can do lot of things.

JOBIN 0 Dec 1, 2021