Skip to content

A tiny wrapper for astroquery.utils.tap, adding support for token authorization.

Notifications You must be signed in to change notification settings

aipescience/django-daiquiri-tap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daiquiri Tap

Daiquiri Tap is a tiny wrapper for astroquery.utils.tap, adding support for token authorization.

Daiquiri Tap is not supported anymore, please use PyVO instead.

The django-daiquiri framework has now improved support for VO TAP.

You can use TAP token authorization in PyVO by manipulating the vo.utils.http.session object, e.g.:

import pyvo as vo

# init tap service
tap_service = vo.dal.TAPService('https://gaia.aip.de/tap')

# set the 'Authorization' header with your token from https://gaia.aip.de/accounts/token/
vo.utils.http.session.headers['Authorization'] = 'Token 23bec8595721dff3fce14265742cd6d0aaef6b95'

# run a syncronous query
tap_service.run_sync('SELECT TOP 5 source_id, ra, dec, parallax FROM gdr2.gaia_source ORDER BY random_index')

# run a asyncronous query
tap_service.run_async('SELECT TOP 5 source_id, ra, dec, parallax FROM gdr2.gaia_source ORDER BY random_index')

About

A tiny wrapper for astroquery.utils.tap, adding support for token authorization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages