class_docstr: Credentials class.
docstr: Activate Streamlit.
  
  Used by `streamlit activate`.
docstr_tok: ["Activate","Streamlit",".","Used","by","`","streamlit","activate","`","."]
code: def activate(self, show_instructions: bool = True) -> None:
      """Activate Streamlit.
  
      Used by `streamlit activate`.
      """
      try:
          self.load()
      except RuntimeError:
          # Runtime Error is raised if credentials file is not found. In that case,
          # `self.activation` is None and we will show the activation prompt below.
          pass
  
      if self.activation:
          if self.activation.is_valid:
              _exit("Already activated")
          else:
              _exit(
                  "Activation not valid. Please run "
                  "`streamlit activate reset` then `streamlit activate`"
              )
      else:
          activated = False
  
          while not activated:
              email = click.prompt(
                  text=email_prompt(),
                  prompt_suffix="",
                  default="",
                  show_default=False,
              )
  
              self.activation = _verify_email(email)
              if self.activation.is_valid:
                  self.save()
                  click.secho(_TELEMETRY_TEXT)
                  if show_instructions:
                      click.secho(_INSTRUCTIONS_TEXT)
                  activated = True
              else:  # pragma: nocover
                  LOGGER.error("Please try again.")
  
imports: import json
  import os
  import sys
  import textwrap
  from collections import namedtuple
  from datetime import datetime
  from typing import Optional
  from uuid import uuid4
  import click
  import toml
  from streamlit import env_util, file_util, util
  from streamlit.logger import get_logger
label_desc: Use image node_id 8 for calling the Credentials obj's underlying member method code with example usage: obj.activate(show_instructions) without return types