MCPcopy Create free account
hub / github.com/pollinations/pollinations / get_env

Function get_env

social/scripts/common.py:207–213  ·  view source on GitHub ↗

Get environment variable with optional requirement check

(key: str, required: bool = True)

Source from the content-addressed store, hash-verified

205
206
207def get_env(key: str, required: bool = True) -> Optional[str]:
208 """Get environment variable with optional requirement check"""
209 value = os.getenv(key)
210 if required and not value:
211 print(f"Error: {key} environment variable is required")
212 sys.exit(1)
213 return value
214
215
216def load_prompt(name: str) -> str:

Callers 14

mainFunction · 0.90
mainFunction · 0.90
get_target_dateFunction · 0.90
mainFunction · 0.90
commit_weekly_to_newsFunction · 0.90
mainFunction · 0.90
generate_highlightsFunction · 0.90
commit_daily_to_newsFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
buffer_utils.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected