python set environment variables command line code example Example: python set windows environment variable os.environ['API_PASSWORD'] = 'secret'