Registry / data / pyvo
library1.9.1pypypi✓ verified 87d ago

PyVO is an Astropy affiliated package that provides a Python interface to access data and services from the Virtual Observatory (VO). It allows users to query astronomical catalogs, image archives, and spectral data through standard VO protocols like TAP, SIA, and SSA. The current version is 1.8.1, and it maintains an active release cadence with regular updates and bug fixes.

pip install pyvo
INSTALL
IMPORT
SIG · PYVO
P
pyvo
datapythonv1.9.1
Install
7.2s avg
Import
2812ms
Disk
165MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.9.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 2.909s · 158.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 7.2s · import 2.716s · 160MB
165MB installed
● package 165MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pyvo
import pyvo
TAPService
from pyvo.dal import TAPService
from pyvo.services import TAPService
Services were moved to the `pyvo.dal` submodule in earlier versions (pre-1.0) and this old path may persist in older examples.
registry
import pyvo.registry
from pyvo import registry
While `from pyvo import registry` works, `import pyvo.registry` is more explicit and common in examples for sub-modules.

This quickstart demonstrates how to search the Virtual Observatory registry for services and then execute a simple ADQL query against a public TAP (Table Access Protocol) service using PyVO. Results are returned as Astropy Table objects, integrating well with the broader Astropy ecosystem.

import pyvo import os # 1. Search the VO registry for services # Example: Find services related to galaxies and spectroscopy print("Searching the VO registry...") results = pyvo.registry.search(keywords=['galaxy', 'spectroscopy']) print(f"Found {len(results)} services matching 'galaxy' and 'spectroscopy'.") # 2. Access a TAP service (Table Access Protocol) # For a stable quickstart, we'll use a widely known public TAP service. # Note: Service availability can change. This is an example. tap_service_url = os.environ.get('PYVO_TAP_SERVICE_URL', 'https://tap.voservices.net/tap') tap_service = pyvo.dal.TAPService(tap_service_url) print(f"\nAttempting to connect to TAP service: {tap_service.url}") # 3. Execute an ADQL (Astronomical Data Query Language) query # Example: Query the ivoa.ObsCore table for Gaia data query = "SELECT TOP 5 ra, dec, dataproduct_type FROM ivoa.ObsCore WHERE obs_collection LIKE '%Gaia%'" try: tap_results = tap_service.search(query) print(f"\nTAP query returned {len(tap_results)} results.") # Results are returned as an Astropy Table object (pyvo.dal.TableSet) print("\nFirst 5 results (Astropy Table):") print(tap_results.to_table()) except Exception as e: print(f"\nError during TAP query: {e}") print("The TAP service might be temporarily unavailable or the query invalid.")
Debug
Known issues
breakingStarting with PyVO v1.6, many optional arguments to functions and methods were changed to be keyword-only. This means calling them positionally will raise a `TypeError`.
fix
Review your code for positional arguments, especially for optional parameters, and explicitly pass them as keyword arguments (e.g., `func(arg1, arg2=value)` instead of `func(arg1, value)`).
affects: >=1.6
gotchaAsynchronous TAP job handling in versions prior to 1.8.1 might not correctly implement or respect timeout parameters for `run_async` methods, potentially leading to jobs hanging indefinitely.
fix
Upgrade to PyVO >= 1.8.1 to ensure proper timeout handling for asynchronous TAP jobs. If upgrading is not possible, implement external timeout mechanisms or carefully monitor job status.
affects: <1.8.1
gotchaError handling for HTTP 429 (Too Many Requests) responses was improved in v1.8.1 with the introduction of `DALRateLimitError`. Older versions might raise generic HTTP errors without explicit retry information.
fix
Upgrade to PyVO >= 1.8.1 to leverage `DALRateLimitError` for more robust handling of rate limits, including automatic retry logic where available. For older versions, implement custom retry logic for HTTP 429 errors.
affects: <1.8.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'astropy'
The core `astropy` library, a fundamental dependency for PyVO, is not installed in your environment.
fix
Install Astropy: `pip install astropy`.
pyvo.exceptions.DALServiceError: HTTP Error 4xx: Client Error or HTTP Error 5xx: Server Error
The remote Virtual Observatory service is inaccessible, unavailable, or returned an error for your request (e.g., invalid query, authentication issue, server-side problem).
fix
Check the specific HTTP error code for details. Verify the service URL, ensure your query is valid, and check the service's status if possible. Network connectivity issues can also cause this.
TypeError: some_method() takes 1 positional argument but N were given
You are passing optional arguments positionally to a PyVO function or method that now expects them as keyword arguments due to API changes in v1.6.
fix
Identify the method in question and change its call signature to use keyword arguments for all optional parameters. For example, change `method(param1, value_for_optional)` to `method(param1, optional_param=value_for_optional)`.
Upgrade
Version history
1.9.1latest on PyPI · released Jun 11, 2026
Audit
Dependencies
astropyrequiredPyVO is built on Astropy's core functionalities, especially for data handling and astronomical units/coordinates.
requestsrequiredUsed internally for HTTP requests to VO services. While often a transitive dependency, issues can arise if not correctly installed.
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
pyvo — pip install pyvo · libregistry