title: python click set allowable values for option
body: <p>I have created a Click command that will copy files from source to destination</p>
  
  <p>The command accepts 3 parameters : </p>
  
  <p>1 -  Source of files</p>
  
  <p>2 -  Destination of files</p>
  
  <p>3 -  Transfer mode (local,ftp)</p>
  
  <pre><code>import click    
  
  @click.group()
  def cli():
      pass
  
  @cli.command()
  @click.argument('source')
  @click.argument('destination')
  @click.option('--mode', required = True)
  def copy(source, destination, mode):
  
      print("copying files from " + source + " to " + destination + "using " + mode + " mode")
  
  
  if __name__ == '__main__':
      cli() 
  </code></pre>
  
  <p>When I call the script using this : <code>command.py copy "C:/" "D:/" --mode=network</code></p>
  
  <p>I get the following output : <code>copying files from C:/ to D:/using network mode</code></p>
  
  <p>As you can see I specified network as mode, but I want only two options : local or ftp</p>
  
  <p>So how can I use Click to set the allowable values of an option ?</p>