how to set environment variable in windows python code example Example: python set windows environment variable os.environ['API_PASSWORD'] = 'secret'