VOResource API¶
Models¶
Pydantic-xml models for IVOA schema VOResource-v1.1.xsd
- class vo_models.voresource.models.Validation(**data)[source]¶
A validation stamp combining a validation level and the ID of the validator.
- Parameters:
validated_by (Url) – (attr) - The IVOA ID of the registry or organisation that assigned the validation level.
value (ValidationLevel)
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.ResourceName(**data)[source]¶
The name of a potentially registered resource.
That is, the entity referred to may have an associated identifier.
- Parameters:
ivo_id (Annotated[str, FieldInfo(annotation=NoneType, required=True, description='A reference to a registry record.', metadata=[_PydanticGeneralMetadata(pattern="ivo://[\\w\\d][\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]{2,}(/[\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]+(/[\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]+)*)?")])] | None) – (attr) - The IVOA identifier for the resource referred to.
value (str) – (content) - The name of the resource.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Date(**data)[source]¶
A string indicating what the date refers to.
The value of role should be taken from the vocabulary maintained at http://www.ivoa.net/rdf/voresource/date_role.
- Parameters:
value (UTCTimestamp) – The date and time of the event.
role (str | None) – (attr) - A string indicating what the date refers to.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Source(**data)[source]¶
A bibliographic reference from which the present resource is derived or extracted.
- Parameters:
value (Url) – The bibliographic reference.
format (str | None) – (attr) - The reference format. Recognized values include “bibcode”, referring to a standard astronomical bibcode (http://cdsweb.u-strasbg.fr/simbad/refcode.html).
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Rights(**data)[source]¶
A statement of usage conditions.
This will typically include a license, which should be given as a full string (e.g., Creative Commons Attribution 3.0 International). Further free-text information, e.g., on how to attribute or on embargo periods is allowed.
- Parameters:
value (str) – The statement of usage conditions.
rights_uri (Url | None) – (attr) - A URI identifier for a license
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.AccessURL(**data)[source]¶
The URL (or base URL) that a client uses to access the service.
- Parameters:
value (Url) – The URL (or base URL) that a client uses to access the service.
use (Literal['full', 'base', 'dir']) – (attr) - A flag indicating whether this should be interpreted as a base URL, a full URL, or a URL to a directory that will produce a listing of files.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.MirrorURL(**data)[source]¶
A URL of a mirror (i.e., a functionally identical additional service interface) to
- Parameters:
value (Url) – A URL of a mirror
title (str | None) – (attr) - A terse, human-readable phrase indicating the function or location of this mirror, e.g., “Primary Backup” or “European Mirror”.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Contact(**data)[source]¶
Information allowing establishing contact, e.g., for purposes of support.
- Parameters:
ivo_id (Annotated[str, FieldInfo(annotation=NoneType, required=True, description='A reference to a registry record.', metadata=[_PydanticGeneralMetadata(pattern="ivo://[\\w\\d][\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]{2,}(/[\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]+(/[\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]+)*)?")])] | None) – (attr) - An IVOA identifier for the contact (typically when it is an organization).
name (ResourceName) –
- (element) - The name or title of the contact person.
This can be a person’s name, e.g. “John P. Jones” or a group, “Archive Support Team”.
address (str | None) –
- (element) - The contact mailing address.
All components of the mailing address are given in one string, e.g. “3700 San Martin Drive, Baltimore, MD 21218 USA”.
email (str | None) – (element) - The contact email address.
telephone (str | None) –
- (element) - The contact telephone number.
Complete international dialing codes should be given, e.g. “+1-410-338-1234”.
alt_identifier (list[Url] | None) –
- (element) - A reference to this entitiy in a non-IVOA identifier scheme, e.g., orcid.
Always use a URI form including a scheme here.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Creator(**data)[source]¶
The entity (e.g. person or organisation) primarily responsible for creating something
- Parameters:
ivo_id (Annotated[str, FieldInfo(annotation=NoneType, required=True, description='A reference to a registry record.', metadata=[_PydanticGeneralMetadata(pattern="ivo://[\\w\\d][\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]{2,}(/[\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]+(/[\\w\\d\\-_\\.!~\\*'\\(\\)\\+=]+)*)?")])] | None) – (attr) - An IVOA identifier for the creator (typically when it is an organization).
name (ResourceName) – (element) - The name or title of the creating person or organisation Users of the creation should use this name in subsequent credits and acknowledgements. This should be exactly one name, preferably last name first (as in “van der Waals, Johannes Diderik”).
logo (Url | None) – (element) - URL pointing to a graphical logo, which may be used to help identify the information source.
alt_identifier (list[Url] | None) – (element) - A reference to this entitiy in a non-IVOA identifier scheme, e.g., orcid. Always use a URI form including a scheme here.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Relationship(**data)[source]¶
A description of the relationship between one resource and one or more other resources.
- Parameters:
relationship_type (str) –
- (element) - The named type of relationship
The value of relationshipType should be taken from the vocabulary at http://www.ivoa.net/rdf/voresource/relationship_type.
related_resource (list[ResourceName]) – (element) - the name of resource that this resource is related to.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.SecurityMethod(**data)[source]¶
A description of a security mechanism.
This type only allows one to refer to the mechanism via a URI. Derived types would allow for more metadata.
- Parameters:
standard_id (Url | None) – (attr) - A URI identifier for a standard security mechanism.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Curation(**data)[source]¶
Information regarding the general curation of a resource
- Parameters:
publisher (ResourceName) – (element) - Entity (e.g. person or organisation) responsible for making the resource available
creator (list[Creator] | None) – (element) - The entity/ies (e.g. person(s) or organisation) primarily responsible for creating the content or constitution of the resource.
contributor (list[ResourceName] | None) – (element) - Entity responsible for contributions to the content of the resource
date (list[Date] | None) – (element) - Date associated with an event in the life cycle of the resource.
version (str | None) – (element) - Label associated with creation or availablilty of a version of a resource.
contact (list[Contact]) – (element) - Information that can be used for contacting someone with regard to this resource.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Content(**data)[source]¶
Information regarding the general content of a resource
- Parameters:
- (element) - A topic, object type, or other descriptive keywords about the resource.
Terms for Subject should be drawn from the Unified Astronomy Thesaurus (http://astrothesaurus.org).
description (str) – (element) - An account of the nature of the resource.
source (Source | None) – (element) - A bibliographic reference from which the present resource is derived or extracted.
reference_url (Url) – (element) - URL pointing to a human-readable document describing this resource.
- (element) - Nature or genre of the content of the resource.
Values for type should be taken from the controlled vocabulary http://www.ivoa.net/rdf/voresource/content_type
content_level (list[str] | None) –
- (element) - Description of the content level or intended audience.
Values for contentLevel should be taken from the controlled vocabulary http://www.ivoa.net/rdf/voresource/content_level.
relationship (list[Relationship] | None) – (element) - a description of a relationship to another resource.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Interface(**data)[source]¶
A description of a service interface.
Since this type is abstract, one must use an Interface subclass to describe an actual interface denoting it via xsi:type.
Additional interface subtypes (beyond WebService and WebBrowser) are defined in the VODataService schema.
- Parameters:
version (str | None) – (attr) - The version of a standard interface specification that this interface complies with.
role (str | None) – (attr) - A tag name that identifies the role the interface plays in the particular capability.
type (str | None) – (attr) - The xsi:type of the interface.
access_url (list[AccessURL]) – (element) - The URL (or base URL) that a client uses to access the service.
mirror_url (list[MirrorURL] | None) – (element) - A (base) URL of a mirror of this interface.
security_method (list[SecurityMethod] | None) – (element) - The mechanism the client must employ to authenticate to the service.
test_querystring (str | None) – (element) - Test data for exercising the service.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.WebBrowser(**data)[source]¶
A (form-based) interface intended to be accesed interactively by a user via a web browser.
- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.WebService(**data)[source]¶
A Web Service that is describable by a WSDL document.
The accessURL element gives the Web Service’s endpoint URL.
- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Resource(**data)[source]¶
- Any entity or component of a VO application that is describable and
identifiable by an IVOA Identifier.
- Parameters:
created (UTCTimestamp) – (attr) - The UTC date and time this resource metadata description was created.
updated (UTCTimestamp) – (attr) - The UTC date this resource metadata description was last updated.
status (Literal['active', 'inactive', 'deleted']) – (attr) - A tag indicating whether this resource is believed to be still actively maintained.
version (str | None) – (attr) - The VOResource XML schema version against which this instance was written.
validation_level (list[Validation] | None) – (element) - A numeric grade describing the quality of the resource description, when applicable, to be used to indicate the confidence an end-user can put in the resource as part of a VO application or research study.
title (str) – (element) - The full name given to the resource
short_name (str | None) – (element) - A short name or abbreviation given to the resource. One word or a few letters is recommended. No more than sixteen characters are allowed.
identifier (Url) – (element) - Unambiguous reference to the resource conforming to the IVOA standard for identifiers
alt_identifier (list[Url] | None) – (element) - A reference to this resource in a non-IVOA identifier scheme, e.g., DOI or bibcode.
curation (Curation) – (element) - Information regarding the general curation of the resource
content (Content) – (element) - Information regarding the general content of the resource
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Organisation(**data)[source]¶
A named group of one or more persons brought together to pursue participation in VO applications.
- Parameters:
facility (list[ResourceName] | None) – (element) - The observatory or facility used to collect the data contained or managed by this resource.
instrument (list[ResourceName] | None) – (element) - The instrument used to collect the data contained or managed by a resource.
created (UTCTimestamp)
updated (UTCTimestamp)
status (Literal['active', 'inactive', 'deleted'])
version (str | None)
validation_level (list[Validation] | None)
title (str)
short_name (str | None)
identifier (Url)
alt_identifier (list[Url] | None)
curation (Curation)
content (Content)
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Capability(**data)[source]¶
A description of what the service does (in terms of context-specific behavior), and how to use it (in terms of an interface)
- Parameters:
standard_id (Url) – (attr) - A URI identifier for a standard service.
type (str | None) – (attr) - A protocol-specific capability is included by specifying a vr:Capability sub-type via an xsi:type attribute on this model.
validation_level (list[Validation] | None) – (element) - A numeric grade describing the quality of the capability description and interface, when applicable, to be used to indicate the confidence an end-user can put in the resource as part of a VO application or research study.
description (str | None) – (element) - A human-readable description of what this capability provides as part of the over-all service.
interface (list[Interface] | None) – (element) - A description of how to call the service to access this capability.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- class vo_models.voresource.models.Service(**data)[source]¶
A resource that can be invoked by a client to perform some action on its behalf.
- Parameters:
rights (list[Rights] | None) – (element) - Information about rights held in and over the resource.
capability (list[Capability] | None) – (element) - A description of a general capability of the service and how to use it.
created (UTCTimestamp)
updated (UTCTimestamp)
status (Literal['active', 'inactive', 'deleted'])
version (str | None)
validation_level (list[Validation] | None)
title (str)
short_name (str | None)
identifier (Url)
alt_identifier (list[Url] | None)
curation (Curation)
content (Content)
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Simple Types¶
VOResource Simple Types
- class vo_models.voresource.types.UTCTimestamp¶
A subclass of datetime to allow expanded handling of ISO formatted datetimes, and enforce the use of a Z identifier for UTC timezone in outputs
- classmethod fromisoformat(date_string)¶
string -> datetime from a string in most ISO 8601 formats
- isoformat()¶
[sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. sep is used to separate the year from the time, and defaults to ‘T’. The optional argument timespec specifies the number of additional terms of the time to include. Valid options are ‘auto’, ‘hours’, ‘minutes’, ‘seconds’, ‘milliseconds’ and ‘microseconds’.
- class vo_models.voresource.types.UTCDateTime[source]¶
A date stamp that can be given to a precision of either a day (type xs:date) or seconds (type xs:dateTime). Where only a date is given, it is to be interpreted as the span of the day on the UTC timezone if such distinctions are relevant.
- class vo_models.voresource.types.ValidationLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
The allowed values for describing the resource descriptions and interfaces.
- VALUE_0 = 0¶
The resource has a description that is stored in a registry. This level does not imply a compliant description.
- VALUE_1 = 1¶
In addition to meeting the level 0 definition, the resource description conforms syntactically to this standard and to the encoding scheme used.
- VALUE_2 = 2¶
In addition to meeting the level 1 definition, the resource description refers to an existing resource that has demonstrated to be functionally compliant.
- VALUE_3 = 3¶
In addition to meeting the level 2 definition, the resource description has been inspected by a human and judged to comply semantically to this standard as well as meeting any additional minimum quality criteria (e.g., providing values for important but non-required metadata) set by the human inspector.
- VALUE_4 = 4¶
In addition to meeting the level 3 definition, the resource description meets additional quality criteria set by the human inspector and is therefore considered an excellent description of the resource. Consequently, the resource is expected to operate well as part of a VO application or research study.