Ducksboard Python module

I've done a very simple package to wrap Ducksboard API and uploaded it to Python Packages, it's my first Python package there so I'm excited. :-)

There are some things to improve in it, but it does everything you can do right now with this API.

Here is an example of code that makes succeeded requests.


#!/usr/bin/python                                                                                                                                    

from ducksboard.ducksboard import Ducksboard                                                                                                         
import time                                                                                                                                          


MYAPIKEY = 'MYAPIKEY'                                                                                                                                        
ENDPOINT = 'gauge1'                                                                                                                                        

d = Ducksboard(MYAPIKEY, ENDPOINT)                                                                                                                   

#Updates a Gauge                                                                                                                                                     
d.gauge(0.22)                                                                                                                                        

#Updates the counter                                                                                                                                                     
d.endpoint = 12317                                                                                                                                   
d.counter(22)                                                                                                                                        

#Graph                                                                                                                                                     
d.endpoint = 334                                                                                                                                      
d.graph([{"timestamp": 1299854684, "value": 10 },
         {"timestamp": 1299855600, "value": 40}])                                                           


d.endpoint = 1123                                                                                                                                    
d.image(image="https://dashboard.ducksboard.com/static/img/timeline/red.gif",
        caption="content")                                                                   

d.endpoint = 1236                                                                                                                                
d.timeline(title="Bye", content="world",
           image="https://dashboard.ducksboard.com/static/img/timeline/red.gif",
           link="http://ducksboard.com")   

I have to improve documentation and upload the example with the package, one step at a time. :-)

If you want to improve the library, found a bug or you just have an idea, you can contact me here or check for the code in Github.

Javier Aguirre

Read more posts by this author.

comments powered by Disqus