Tag Archives: tutorial

Imgur API part 1: getting an Anonymous Key and uploading an image

This first part will focus on creating an anonymous API (Application programming interface) key for your script to use, and then upload an image to imgur.com.  For this, and any following tutorals, I will be using Windows 7×64, with Python 2.7.

You will need to create an anonymous API key at http://imgur.com/register/api_anon, it’s really simple, just feed the name of your app, so the dudes over at Imgur know what your intentions are, and then your personal information and finally, the reCaptcha, to verify you’re not a bot. The next page will give you your developer API key; this is important. This key will allow you to interact with the Imgur API. Since this is the limited Anonymous API, you will only have access to basic functions, like uploading images from your computer or from another website, and getting gallery and image information. Luckily, that’s enough for our purposes here.

The documentation for the Imgur API that we’ll be using today is found here: http://api.imgur.com/resources_anon, and the requests module documentation is here http://docs.python-requests.org/en/latest/user/quickstart/. Now, open up your favourite text editor for coding. I like using Wing IDE Professional,  but I’m sure notepad++ and any other one would work just as nicely.  This is where the fun part begins. Hit the jump!

Tinypaste of the full working code!

Continue reading Imgur API part 1: getting an Anonymous Key and uploading an image

Wrote a Tile system!

Welcome back! I’m very happy to be working on the game again, after the brief hiatus. I made a grid system, as shown below. Here’s the latest thing little app I made, the colors and text is all just there for making the tiles visible, otherwise it’d be a blank screen :

Hit the jump for code examples, and what my old broken version of the code was.

Continue reading Wrote a Tile system!

Pygame Rotation Tutorial

Hey there,

So what I was recently having some trouble with was with Python’s PyGame Rotate function. I was having trouble understanding what some of from the comments found here meant, or were trying to illustrate, let alone the documentation given, so I resolved to figure it out , once and for all, so hopefully this post will be enough to get someone else on track. I think I was getting caught up on the different ways to deal with blitting and surfaces and rects.

Continue reading Pygame Rotation Tutorial