File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " dean_utils"
7- version =" 0.0.59 "
7+ version =" 0.0.60 "
88authors =[
99 { name =" Dean MacGregor" , email =" powertrading121@gmail.com" }
1010]
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
13__all__ = [
24 "async_abfs" ,
35 "az_send" ,
1416 "update_queue" ,
1517]
1618import contextlib
19+ import os
1720
1821from dean_utils .polars_extras import (
1922 pl_scan_hive ,
@@ -65,3 +68,22 @@ def wrapper(*args, **kwargs):
6568 )
6669
6770 return wrapper
71+
72+
73+ def stor_opts (os_env : str = "Synblob" ) -> dict [str , str ]:
74+ conn_str = os .environ .get (os_env )
75+ assert conn_str is not None
76+ return {
77+ k : y [1 ]
78+ for x in conn_str .split (";" )
79+ if (k := _name_key ((y := x .split ("=" ))[0 ])) is not None
80+ }
81+
82+
83+ def _name_key (x : str ) -> str | None :
84+ if x == "AccountName" :
85+ return "account_name"
86+ elif x == "AccountKey" :
87+ return "account_key"
88+ else :
89+ return None
You can’t perform that action at this time.
0 commit comments