U
    õÕ/e×
  ã                   @  s^   d Z ddlmZ ddlZe e¡ZddlmZ ddl	m
Z
 ddlmZ dZG d	d
„ d
eƒZdS )a×   Generate new secret keys that can be used by the Bokeh server to
cryptographically sign session IDs.

To generate a new secret key for use with Bokeh server, execute

.. code-block:: sh

    bokeh secret

on the command line. The key will be printed to standard output.

The secret key can be provided to the ``bokeh serve`` command with
the ``BOKEH_SECRET_KEY`` environment variable.

.. warning::
    You must keep the secret secret! Protect it like a root password.

é    )ÚannotationsN)Ú	Namespace)Úgenerate_secret_keyé   )Ú
Subcommand)ÚSecretc                   @  s(   e Zd ZdZdZdZdddœdd„Zd	S )
r   z/ Subcommand to generate a new secret key.

    Úsecretz3Create a Bokeh secret key for use with Bokeh serverr   ÚNone)ÚargsÚreturnc                 C  s   t ƒ }t|ƒ dS )z


        N)r   Úprint)Úselfr
   Úkey© r   úD/tmp/pip-unpacked-wheel-f5fndrjf/bokeh/command/subcommands/secret.pyÚinvokeE   s    zSecret.invokeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚhelpr   r   r   r   r   r   ;   s   r   )r   Ú
__future__r   ÚloggingÚ	getLoggerr   ÚlogÚargparser   Zbokeh.util.tokenr   Ú
subcommandr   Ú__all__r   r   r   r   r   Ú<module>   s   
