Skip to main content

Functions and classes to access online astronomical data resources

Project description

Documentation | Blog | View on Github | Download Stable ZIP | Download Stable TAR

Latest PyPI version Documentation Status Github Actions CI Status Coverage results Zenodo

Accessing Online Astronomical Data

Astroquery is an astropy affiliated package that contains a collection of tools to access online Astronomical data. Each web service has its own sub-package. For example, to interface with the SIMBAD website, use the simbad sub-package:

>>> from astroquery.simbad import Simbad
>>> theta1c = Simbad.query_object('tet01 Ori C')
>>> theta1c.pprint()
   MAIN_ID          RA           DEC      ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE
------------- ------------- ------------- ... -------- -------------- -------------------
* tet01 Ori C 05 35 16.4637 -05 23 22.848 ...        A              O 2007A&A...474..653V

Installation and Requirements

Astroquery works with Python 3.7 or later. As an astropy affiliate, astroquery requires astropy version 4.2.1 or later.

astroquery uses the requests module to communicate with the internet. BeautifulSoup and html5lib’ are needed for HTML parsing for some services. The keyring module is also required for accessing services that require a login. These can all be installed using pip or anaconda. Running the tests requires curl to be installed.

The latest version of astroquery can be pip installed (note the --pre for picking up released developer versions, and -U for upgrade):

$ python -m pip install -U --pre astroquery

To install all the mandatory and optional dependencies add the [all] identifier to the pip command above (or use [docs] or [test] for the dependencies required to build the documentation or run the tests):

$ python -m pip install -U --pre astroquery[all]

To install the ‘bleeding edge’ version:

$ python -m pip install git+https://github.com/astropy/astroquery.git

or cloned and installed from source:

$ # If you have a github account:
$ git clone git@github.com:astropy/astroquery.git
$ # If you do not:
$ git clone https://github.com/astropy/astroquery.git
$ cd astroquery
$ python -m pip install .

Using astroquery

Importing astroquery on its own doesn’t get you much: you need to import each sub-module specifically. See the documentation for a list of Available Services. The API shows the standard suite of tools common to most modules, e.g. query_object and query_region.

To report bugs and request features, please use the issue tracker. Code contributions are very welcome, though we encourage you to follow the API and contributing guidelines as much as possible.

Citing Astroquery

If you use astroquery, please cite the paper we published in The Astronomical Journal.

The BibTeX entry is available from the package itself:

import astroquery
astroquery.__citation__

In addition you may also want to refer to specific versions of the package. We create a separate Zenodo DOI for each version, they can be looked up at the following Zenodo page

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astroquery-0.4.8.dev9306.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

astroquery-0.4.8.dev9306-py3-none-any.whl (5.3 MB view details)

Uploaded Python 3

File details

Details for the file astroquery-0.4.8.dev9306.tar.gz.

File metadata

  • Download URL: astroquery-0.4.8.dev9306.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.7.0 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for astroquery-0.4.8.dev9306.tar.gz
Algorithm Hash digest
SHA256 efc7d60220526a0a819e4c8d87d206f5cba598d9ee7ed16ec56805c4dc60e832
MD5 202974061ee5c9e9864637a2e207c26b
BLAKE2b-256 87c400f524ae41c97f9861e070cb6281aefd7cb32837369b2906a723827da12e

See more details on using hashes here.

File details

Details for the file astroquery-0.4.8.dev9306-py3-none-any.whl.

File metadata

  • Download URL: astroquery-0.4.8.dev9306-py3-none-any.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.7.0 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for astroquery-0.4.8.dev9306-py3-none-any.whl
Algorithm Hash digest
SHA256 47a133403360516b42551f5abd505c36c2b9b61bc8c7d97de25e81547fe57143
MD5 92bee87d8f2cf87e105abc5e6a7ec043
BLAKE2b-256 6f2ef8c55cff1573dec6a5cdfc3f7340f4fc689298e2c7655332fe4349db1baa

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