search¶
- pyvo.registry.search(*constraints: Constraint, includeaux: bool = False, maxrec: int = None, **kwargs)[source]¶
execute a simple query to the RegTAP registry.
The function accepts query constraints either as Constraint objects passed in as positional arguments or as their associated keywords. For what constraints are available, see ref:
registry_basic_interface
.The values of keyword arguments may be tuples or lists when the associated Constraint objects take multiple arguments.
All constraints, whether passed in directly or via keywords, are evaluated as a conjunction (i.e., in an AND clause).
- Parameters:
- *constraints
rtcons.Constraint
instances The constraints (keywords to match, positions to cover, …) that the returned records need to satisfy. The accepted constraints are:
keywords: one or more freetext words, mached in the title, description or subject of the resource.
servicetype: constrain to one of tap, ssa, sia, conesearch (or full ivoids for other service types). This is the constraint you want to use for service discovery.
ucd: constrain by one or more UCD patterns; resources match when they serve columns having a matching UCD (e.g., phot.mag;em.ir.% for “any infrared magnitude”).
waveband: one or more terms from the vocabulary at http://www.ivoa.net/rdf/messenger giving the rough spectral location of the resource.
author: an author (“creator”). This is a single SQL pattern, and given the sloppy practices in the VO for how to write author names, you should probably generously use wildcards.
datamodel: one of obscore, epntap, or regtap: only return TAP services having tables of this kind.
ivoid: exactly match a single IVOA identifier (that is, in effect, the primary key in the VO).
spatial: match resources covering a certain geometry (point, circle, polygon, or MOC). RegTAP 1.2 Extension.
spectral: match resources covering a certain part of the spectrum (usually, but not limited to, the electromagnetic spectrum). RegTAP 1.2 Extension
temporal: match resources covering a some point or interval in time. RegTAP 1.2 Extension
Multiple constraints are combined conjunctively (“AND”).
- includeauxbool
Flag for whether to include auxiliary capabilities in results. This may result in duplicate capabilities being returned, especially if the servicetype is not specified.
- maxrecint
Overrides the RegTAP server’s default limit on the number of rows to return. You may need to use this if you want to retrieve more than a few thousand matches. The server may also have a hard limit that
maxrec
cannot override. Note that truncated search results are not reproducible.- **kwargsstrings, mostly
shorthands for
constraints
; see the documentation of a specific constraint for what keyword it uses and what literal it expects.
- *constraints
- Returns:
- RegistryResults
a container holding a table of matching resource (e.g. services)
See also
RegistryResource