MCPcopy Create free account
hub / github.com/SuperJJ007/CSSwitch / load_key

Function load_key

proxy/csswitch_proxy.py:207–219  ·  view source on GitHub ↗
(prov, args)

Source from the content-addressed store, hash-verified

205
206
207def load_key(prov, args):
208 env = prov["key_env"]
209 if os.environ.get(env):
210 return os.environ[env].strip()
211 if args.env_file and os.path.isfile(args.env_file):
212 for raw in open(args.env_file):
213 raw = raw.strip()
214 if not raw or raw.startswith("#") or "=" not in raw:
215 continue
216 k, v = raw.split("=", 1)
217 if k.strip() == env:
218 return v.strip().strip('"').strip("'")
219 return None
220
221
222def _provider_state(areq):

Callers 1

csswitch_proxy.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected