title: Is there any way to read .env files in macOS?
body: <p>I created the .env file using the command and created variables like <code>token_id=&quot;13423edq234&quot;</code> and so on. I don't want to use an external package like dotenv to read the file. I just want to know if there's any way to load the .env file that I've created so that it can be read by Python. Also I don't want to add the env variable to zprofile.</p>
  <pre><code>vim .env
  </code></pre>
  <p>and in the Python 3 shell,</p>
  <pre><code>import os
  os.environ['token_id']
  </code></pre>
  <p>and it says, it's not defined.</p>