Mike Levin SEO

Future-proof your technology-skills with Linux, Python, vim & git... and me!

Wrapping Google API Python Client into Levinux

by Mike Levin SEO & Datamaster, 10/02/2013

Things don’t happen overnight… or shall I say, things that take layered on -skills and learning don’t happen overnight. skills and learning don’t happen overnight. So, the continuous layering-on is so important. That’s ALL THE MORE REASON to accelerate things. And so, I need to actually DO things. And it’s 1, 2, 3… 1?

It’s all about OAuth 2 on Levinux right at this moment. So… hmmmm. Okay, get that Levinux instance running. Make sure it works equally well on Windows, OS X and Ubuntu. Use Dropbox to do this. Live with the occasional collisions. Don’t believe the “green” light of Dropbox. Let the syncing finish. It may take longer than you think.

Hmmm. There are issues with 64 bit and there are issues with Ubuntu. SO, trying to get this working on Ubuntu 64 is an utter total distraction. Okay, okay. So, success and failure is determined by your ability to prevail in just about any environment, no matter how distracting and non-conducive to brilliance it is.

Hmmm, hmmm, hmmm. Okay, okay. 1, 2, 3. 1?

Find the OAuth 2 example. This is the most necessary picture to keep in mind: https://developers.google.com/accounts/docs/OAuth2

The thing to start out with is the “Service accounts” method of login. It’s a bit different than most types of login that have a web browser in the picture. So, get to it.

Okay, remember that this is the important URL at the beginning of the chain.


You need to actually be logged in with the correct Google account when you visit this URL. But this is a competing URL which seems more confusing:


Both UI’s are terrible. It’s terrible that this sort of thing is an obstacle to getting started. But what we are encountering is the growth pains of more responsible assignable login permission models. Simple usernames and passwords given out all over the place are just a bad idea. Dealing with this login step WITHOUT getting roped into the Google App Engine is like 50% of this project.

Okay, I really need to frame this work around a project REALLY WORTH DOING. Now, becoming a developer on Google Glass may really well be worth doing on its own independent of anything else going on in my career.

Okay, we have to think of everything in terms of a six minute script of focused, awesome productivity that everyone in the field (or who aspires to be) would be interested in watching. IT’S ALWAYS A SHOW! So, how does that 6 minutes open?

Safe-ish authentication and authorization is all the rage these days. It’s driven by the very real fact that you can’t give you username and password to just any old application that wants to be able to post to your timeline or such. Instead, you log in with really only the original application… which gives some sort of stand-in for username/password authentication.

Today’s 6-minute script… it starts out…

Okay, we have a perfectly workable Levinux. And now it’s time to do some work with it. There’s usually going to be 2 sides to that work. The first, is getting your working environment exactly right for the project you’re working on. And that means a server-building recipe. And so, I need to start building a library of server-building recipes for types of work you might do with Levinux.

I left myself the perfect opening for this, although I have been quite resistant to seeing it so far. And that is Option #4, which starts out as “Get Python” and turns into “Learn Python” after the script is executed. But it’s not really “Learn Python” that I should lead people to. It’s a NESTED MENU that offers to build this API environment or that, based on your needs.

Given that I am using the official Google API Python Client for my latest project, it would seem a logical place to start. There are no “official” Python API questions, as there would be with Facebook, Twitter, Tumblr or pretty much any other API platform than Google itself, which has a pro-Python bias due to its heritage.

Okay, let’s take this approach. It moves Levinux forward, and also gets my work done for my employer.

I need to improve the wedge for building Levinux into a dev platform for anything you may use the Google API Python Client for. Make it the PREFERRED way to do this sort of work. You don’t need to understand everything. You just need to rapidly iterate in on it. So, start iterating. Get it out of this journal and into the Levinux file.

Okay, this is good. I’m extending my capabilities little by little by little, sticking to what I know and expanding out like I have a beach head or a foothold.

Wow, okay this is great. This will be my 1.9 rev of Levinux. But let me try to get things working a little bit better on Ubuntu 32 and 64 bit versions. I need both running at the same time. Screw mint. Given the limited hard drive space on my Macbook Air, it’s going to be XP, Ubuntu 13.04 32 bit and Ubuntu 13.04 64 bit. I’m going to make sure Levinux runs properly on:

Windows 7, 64 bit - my work laptop OS X 10.8.5 - my personal laptop’s native OS Ubuntu 13.04 32 bit on VMWare Fusion Ubuntu 13.04 64 bit on VMWare Fusion Windows XP 32 bit on VMWare Fusion

Make sure you snapshot your Ubuntu’s in decent virgin state. Perhaps just up to the latest software updates, plus Dropbox. But then systematize the process of rounding up the Linux dependencies with the ldd command. Perhaps finally sacrifice file size in favor of true portability.

Okay, the Mac and the Windows varieties of Levinux rarely have problems reported. But the Linux versions are always rife with issues. It all has to do with the dependency files. I had one person complain on the forums lately about it not running on Windows 8 or chopping off the bottom line or something like that. I’ll look into it. But so long as it runs on my 2 Windows test environments, I’ll be satisfied. I can’t go chasing down every outlier’s problems.

Hmmmm. Okay, I think it’s time to start using Bitbucket a little bit better. Bitbucket or any git repository is what keeps your code of any real value safe.

Okay, I can only in good conscious release Levinux 1.9 if I solve the Ubuntu 64 bit problems. If I do an apt-get install qemu on Ubuntu 13.04 64 bit

Okay, I did the ldd thing, and tried launching Levinux on a mostly virgin 64 bit Ubuntu 13.04 install. All it too was libSDL-1.2.so.0.

Okay, done. I have rev’d to Levinux Beta 1.9.