.. _apikey: API Key ~~~~~~~ .. admonition:: Need an API key? :class: note If you still need an API key `get in touch `_ and let our solution engineers set you up with a free trial. There are two options for configuring your API key. One involves setting a .env file on your computer which contains your API key: .. tab-set:: .. tab-item:: .env file Once this .env file has been set, this will enable your API key to be read from any script run in the subsequent directory tree. .. tab-set:: .. tab-item:: Windows .. tab-set:: .. tab-item:: Powershell .. code-block:: powershell echo "TWINLAB_API_KEY=" > .env .. tab-item:: Command Line .. code-block:: console echo TWINLAB_API_KEY= > .env .. tab-item:: Linux .. code-block:: bash echo "TWINLAB_API_KEY=" > .env .. tab-item:: MacOS .. code-block:: bash echo "TWINLAB_API_KEY=" > .env .. tab-item:: set_api_key() Setting this function will enable you not to have to store your API key on your computer's operating system. .. code-block:: python import twinlab as tl API_KEY = '' tl.set_api_key(API_KEY) .. warning:: While we offer the flexibility to utilize the `set_api_key()` functionality, this should be used with care not to publicly expose your API key when sharing files.