-
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.
Pull the auth parts into utils along with other utility functions Make catalog.py a lot shorter and break that off from siav2 Make a new service.py to hold the SIAv2 service
- Loading branch information
Showing
3 changed files
with
65 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pyvo | ||
from pyvo.dal import SIA2Service | ||
|
||
from .utils import get_pyvo_auth, get_service_url | ||
|
||
def get_siav2_service(*args: str) -> pyvo.dal.SIA2Service: | ||
if len(args) == 0: | ||
ds = "dp0.2" | ||
elif args == "latiss": | ||
ds = "latiss" | ||
|
||
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