o
    ÅB®f€  ã                   @   s$   d dl Z dd„ Zdd„ Zdd„ ZdS )é    Nc                 C   ó2   d}d}|d | d |  d }t  |¡}| ¡ S )NÚ 1aee5b2855bac524f4923a7ad14cd3e6z/http://api.openweathermap.org/data/2.5/weather?úappid=ú&q=ú&units=imperial©ÚrequestsÚgetÚjson©ÚcityÚapi_keyÚbase_urlÚcomplete_urlÚresponse© r   ú"/home/ubuntu/webapp/app/weather.pyÚget_weather   ó
   
r   c                 C   r   )Nr   z0http://api.openweathermap.org/data/2.5/forecast?r   r   r   r   r   r   r   r   Úget_forecast
   r   r   c                 C   s$   g d¢}t | d d ƒ}||d  S )N)ÚNÚNNEÚNEÚENEÚEÚESEÚSEÚSSEÚSÚSSWÚSWÚWSWÚWÚWNWÚNWÚNNWg     €6@g      à?é   )Úint)ÚdegÚ
directionsÚixr   r   r   Údeg_to_cardinal   s   r+   )r   r   r   r+   r   r   r   r   Ú<module>   s    