How to use azurite with fsspec.open? #1367
Unanswered
JoostvDoorn
asked this question in
Q&A
Replies: 1 comment 1 reply
-
So what I did now is to make sure I pass storage_options to my functions and pass: ACCOUNT_NAME = "devstoreaccount1"
KEY = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" # NOQA
CONN_STR = f"DefaultEndpointsProtocol=http;AccountName={ACCOUNT_NAME};AccountKey={KEY};BlobEndpoint={URL}/{ACCOUNT_NAME};" # NOQA
storage_options = {"protocol": "abfs", "connection_string": CONN_STR, "account_name": ACCOUNT_NAME}
# Add you container here.....
# ...
url = "az://container_name"
fs, path = fsspec.core.url_to_fs(url, **storage_options) Similar to how it's done in ABFS lib: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been testing with azurite in some situations, and now want to expand my azurite testing on functions that use fsspec. I and was wondering if anyone has experience using fsspec with azurite, and what would be their opinion on the best practice to test this with fsspec?
Since azurite uses http to reference files instead of the abfs/az protocol. Out of the box using
fsspec.open
will not work. Probably there is some way to monkey patch this to redirect the http protocol to azure.Beta Was this translation helpful? Give feedback.
All reactions