Skip to content

Instantly share code, notes, and snippets.

@mphasak
mphasak / gist:45855465cbd1d4338a207d33a6983747
Last active June 26, 2017 23:06
BloomSky BitBar temperature
#!/usr/bin/env PYTHONIOENCODING=UTF-8 /usr/local/Cellar/python/2.7.13/bin/python
import bloomsky_api
try:
bloomsky_key = "Your API key"
client = bloomsky_api.BloomSkyAPIClient(api_key=bloomsky_key)
data = client.get_data()
current_temp_int = int(round(data[0]['outdoor']['temperature']))
current_temp_formatted = u'{0}\u00B0F'.format(current_temp_int)