Don’t upload private information such as a secret access key to Github or other cloud platforms. Instead, save the private information to your local machine using environment variables.
To save environment variables in macOS and Linux, save the secret information in .bash_profile.
Now you can access the environment variable easily using os.getenv("YOUR_SECRET_KEY")
in your Python script!.