Obvious Ideas

From the desk of a Software Developer

Archive for the ‘Snippet’ tag

Using Mixpanel API In Google App Engine Applications (Python)

View Comments

We started using MixPanel to get realtime statistics on user engagement in our application. We’ve been using MixPanel before for funnel tracking, but you can’t really appreciate their service until you start using their event tracking. It is truly realtime (as advertised) – the second the user performs an action on your application, you see it on your dashboard.

Besides the realtime reporting what I really like about MixPanel is the fact that they allow easily reporting from your backend and not only from frontend/Javascript (as opposed to Google Analytics).

Within their documentation they have code samples in many languages, including Python. But their Python sample requires ability to start new processes on the server you’re running – something not possible on App Engine. Therefore I changed it to use URLFetch in RPC mode (so that calls to Mixpanel won’t block the call):

It could be re-factored more, like allowing setting the project token outside the function call, but that I will leave for you to do :) (and if you do, please share with us)

Arik

Written by Arik

December 14th, 2009 at 7:21 pm

How To Send SMS Message From Python Via Skype

View Comments

In case you didn’t know, Skype offers an extensive API for their application. This API can be used via Java library, COM module or a Python library. The Java library, COM Module and Python library all share similar features and I decided to try out the Python library. What I wanted to do is to write a simple Python script that uses the Skype API to send SMS message from Skype. After going through their API documention, I was ready to go and the outcome was this short script: 

I think that the code is pretty straightforward and doesn’t require additional explaining. Feel free to ask questions at the comments.
Arik

Written by Arik

October 3rd, 2008 at 7:56 pm