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