An implementation of `pystac`'s `StacIO` for reading static STACs stored in Azure Blob Storage.
Project description
Azure Blob Storage StacIO
An implementation of pystac's StacIO for reading static STACs stored in Azure Blob Storage.
Usage
Set the global default StacIO:
import os
from az_blob_stacio import BlobStacIO
BlobStacIO.conn_str = os.environ["AZURE_STORAGE_CONNECTION_STRING"]
pystac.StacIO.set_default(BlobStacIO)
catalog = pystac.Catalog.from_file("https://myaccount.blob.core.windows.net/mycontainer/catalog.json")
Use a context manager to temporarily BlobStacIO and reset to DefaultStacIO upon exiting the context:
import os
from az_blob_stacio import BlobStacIO, blob_stacio
BlobStacIO.conn_str = os.environ["AZURE_STORAGE_CONNECTION_STRING"]
with blob_stacio(BlobStacIO):
catalog = pystac.Catalog.from_file("https://myaccount.blob.core.windows.net/mycontainer/catalog.json")
Overwrite behavior is configurable by setting BlobStacIO.overwrite (defaults to True).
Credentials
Azure Blob Storage credentials can be provided by providing either:
-
a storage connection string as shown above or by setting
AZURE_STORAGE_CONNECTION_STRINGin your environment -
a credential object that provides access to the storage account hosting the static STAC
from azure.core.credentials import AzureSasCredential BlobStacIO.credential = AzureSasCredential("my-sas-token")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file az_blob_stacio-0.1.1.tar.gz.
File metadata
- Download URL: az_blob_stacio-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b91e933d01d181d0bfe02f8d276feecd1e2078f495cfdcb12a2bbd49ef71392
|
|
| MD5 |
fa8f546d4bac7cc7f136cc58738eaaeb
|
|
| BLAKE2b-256 |
eb7db65525bc52050aca0f4cf5f3fbd4a5f658c1b206fbcc26fc5b110f7fdc1e
|
File details
Details for the file az_blob_stacio-0.1.1-py3-none-any.whl.
File metadata
- Download URL: az_blob_stacio-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c27c669924529ca45db7274ea051ae7274a8fa1db590d8a2d97534a9deb2cb8
|
|
| MD5 |
6b910c861adb5bc6a850058cd899fe1d
|
|
| BLAKE2b-256 |
7aacaf33d0b27420629c8371dc7f0839f14abb9c621a90b6749f577fbd20c9a4
|