-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifiers - Private static STAC JSON files in private Azure Blob storage #421
Comments
The signature of def modifier(modifiable: Modifiable) -> None:
if isinstance(modifiable, Catalog):
for child in modifiable.get_children():
child.set_self_href(_sign(child.get_self_href()))
def _sign(href: str) -> str:
... Does that help? |
Thanks @gadomski ! That does help a lot :) I did read through the I had ended up implementing a modified version of this example. def sign_request(request: requests.Request) -> requests.Request:
def append_tok(href):
return f'{href}?{sas}'
request.url = append_tok(request.url)
return request However, that was a bandaid to traverse the Catalog and children - still had some issues pulling the Assets, but I will give your (untested) approach a try! |
Is there any interest in an |
Something different than https://pystac.readthedocs.io/en/stable/api/pystac.html?highlight=walk#pystac.Catalog.walk? |
TIL. Neat.
…On Mon, Feb 13, 2023 at 8:52 AM Pete Gadomski ***@***.***> wrote:
Something different than
https://pystac.readthedocs.io/en/stable/api/pystac.html?highlight=walk#pystac.Catalog.walk
?
—
Reply to this email directly, view it on GitHub
<#421 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKAOISBOWZ2DCOHAHZI27LWXJDCJANCNFSM6AAAAAAUPW4KBE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Moving this out of the v0.7 milestone, as there may be more auth work/docs coming from the PC side of things in the not-to-distant future. |
This is nice! I have come across more use cases in my projects and internal work for using static catalogs over served ones.
Naturally, this is just a suggestion, I look to your knowledge on the best approach for expanding access to static catalogs. |
This idea of a static catalog search has been discussed a few times #425, #66 and always deemed out of scope. I did write up a little proof of concept (https://github.com/jsignell/stac-static) of search that implements the search API on top of an item collection loaded locally into a geopandas dataframe. |
I am trying to get the pystac_client to work with a set of static JSON files sitting in a private Azure Blob storage Container. I realize I must implement a modifier to alter the HREF's in-place with a SAS token, however, I am struggling to get this to work properly.
Am I not seeing the documentation for writing modifiers? Is there a generic signing modifier that will take my SAS token and sign the relevant HREFs for me? All my STAC files pass validation checks and all the Catalog is ABSOLUTE_PUBLISHED.
If having a set of generic modifiers built-in to pystac-client is out of scope, would it be possible to have better documentation for implementing modifiers?
The text was updated successfully, but these errors were encountered: