U
    Fc                     @   s   d Z zddlmZ W n   ddlmZ Y nX zddlmZ W n   ddlmZ Y nX ddlmZm	Z	m
Z
 ddlZeeZe Zejddgdd	d
 Zejejdgddd ZedkreejdejZeejkrde_ejdejed dS )zgReceiver module for processing SendGrid Inbound Parse messages.

See README.txt for usage instructions.    )Config)Parse)Flaskrequestrender_templateN/GET)methodsc                   C   s   t dS )z2Show index page to confirm that server is running.z
index.html)r    r
   r
   @/tmp/pip-unpacked-wheel-7j3043uk/sendgrid/helpers/inbound/app.pyindex   s    r   POSTc                  C   s   t tt} t|   dS )z8Process POST from Inbound Parse and print received data.OK)r   configr   print
key_values)parser
   r
   r   inbound_parse   s    
r   __main__ZPORTFz0.0.0.0)hostdebugport)__doc__r   r   Zsendgrid.helpers.inbound.configr   r   Zsendgrid.helpers.inbound.parseZflaskr   r   r   os__name__ZappZrouter   Zendpointr   intenvirongetr   r   runZ
debug_moder
   r
   r
   r   <module>   s*   



