-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from lsst-sqre/tickets/DM-41830
[DM-41830] Add SIAv2 server function
- Loading branch information
Showing
4 changed files
with
76 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from pyvo.dal import SIA2Service | ||
|
||
from .utils import get_pyvo_auth, get_service_url | ||
|
||
|
||
def get_siav2_service(label: str) -> SIA2Service: | ||
"""Return a configured SIA2Service object that is ready to use.""" | ||
if label != "staff": | ||
raise Exception(label + " data not available at your location") | ||
|
||
# No matter what, we've only got one sia server per environment | ||
# so for now just do some checking. | ||
return SIA2Service(get_service_url("siav2"), get_pyvo_auth()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters