🔵 🔵 🔵


Primary

၊၊||၊|။

os.getenv() ⚬|Documentation|1st|20260122195929-00-⌔

os — Miscellaneous operating system interfaces — Python 3.14.2 documentation#os.getenv

os.getenv(key, default=None)

Return the value of the environment variable key as a string if it exists, or default if it doesn’t. key is a string. Note that since getenv() uses os.environ, the mapping of getenv() is similarly also captured on import, and the function may not reflect future environment changes.

On Unix, keys and values are decoded with sys.getfilesystemencoding() and 'surrogateescape' error handler. Use os.getenvb() if you would like to use a different encoding.

Availability: Unix, Windows.

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •