Showing posts with label libraries. Show all posts
Showing posts with label libraries. Show all posts

21 September 2011

My Five Favorite Python Library Finds on Github This Week

  1. https://github.com/edsu/microdata - (python library for extracting html5 microdata)

    I've been working with HTML5 a lot especially when dealing with Wordpress blogs and was interested in what's available for HTML5 in Python.

  2. https://github.com/pneff/wsgiservice - (Python WSGI framework to create REST web services)

    Over the last few weeks I've had the (mis)fortune of having to develop a public API for a company using PHP and the Slim framework.  Slim isn't bad but PHP is getting long in the teeth and it's just not nearly as fun to develop in as Python and Ruby.  wsgiservice looks like a good choice (from out of many) for building RESTful APIs.

  3. https://github.com/mcfunley/etsy-python - (Python access to the Etsy API)

    Esty's awesome.  Python's awesome.  Putting the two together and making a cool site or tool of some sort seems like a good idea and this module can certainly help.

  4. https://github.com/liamks/pyitunes - (Python Itunes Library parser)

    iTunes is hated my many but I love it and this library (although not maintained as well as it could be) allows access to my music collection.  I use it for fixing meta tags on my audio files.

  5. https://github.com/solex/python-odesk - (Python bindings for oDesk API )

    I work full-time on oDesk these days as a developer and am building some custom tools to make finding new jobs easier and to make visualizing some of my key statistics easier.  For instance, oDesk doesn't give you an earnings to date readout and I would like that.  I would also like to be able to filter jobs out so that I'm never shown jobs below my minimum price point.

10 September 2011

Requests - Easiest, Most Enjoyable Way to Make HTTP Requests in Python

I've been working for the last week designing and implementing an API for in-house use at a company in Georgia. The API is being built with PHP5 and a micro-framework called Slim. I would have preferred to build it in web.py but because ultimately this decision was left to the owners who are responsible for maintaining it's being done in PHP (a language that they're familiar with).

One of the sore spots has been testing the API as we put it together. In the end it will be used by the developers that they hired to write mobile phone applications. I settled on using a Python script for testing the API but quickly tired of writing the HTTP request code using httplib2 and urllib2. I set out for a better HTTP Request library and quickly found Requests; an elegant and dead-simple library that makes writing code to work with HTTP Requests actually enjoyable.

>>> import requests
>>> r = requests.get("http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?v=2&alt=jsonc")
>>> r.status_code
200
>>> print r.content
{"apiVersion":"2.1","data":{"updated":"2011-09-09T19:54:17.000-07:00","totalItems":99,"startIndex":1,"itemsPerPage":25,"items":[{"id":"X9YMU0WeBwU","uploaded":"2011-08-17T00:52:31.000Z","updated":"2011-09-11T01:09:51.000Z","uploader":"LadyGagaVEVO","category":"Music","title":"Lady Gaga - Yoü And I (Official Video)","description":"Music video by Lady Gaga performing Yoü And I (Official Video). Lady Gaga's \"Yoü And I\" video received 1,054,214 video views on YouTube prior to the official VEVO video release.  © 2011 Interscope Records","tags":["You","and","new","video","song","official","Laurieann","Gibson","haus","of","gaga","Mother","Monster"],"thumbnail":{"sqDefault":"http://i.ytimg.com/vi/X9YMU0WeBwU/default.jpg","hqDefault

[ ... cut for space ... ]
I think I will also go back through and rewrite a bunch of my YQL code to use Requests instead for it's HTTP request needs. This should be a standard part of your Python toolbox for sure.

05 March 2011

5 Python Libraries I'm Looking Forward To Working With

I've been combing Google Code looking for interesting and useful Python libraries to work with and have decided on five that I plan to use this month.
  1. Name:    gdata-python-client
    Descr:    Google Data APIs Python Client Library

    I've not done much work with automating my usage of Google's Data services yet and hope that I can be more productive by using this library. Specifically I want to start integrating some of their API stuff into a django administration interface that I have for a network of affiliate sites that I run.
  2. Name:    android-scripting
    Descr:    Scripting Layer for Android brings scripting languages to Android

    Yesterday I went down to Fry's Electronics and was checking out an Android Tablet they had for $139.  I'm seriously thinking about getting one and developing some tools for mobile security auditors and for programmers/sysadmins.  Even though I'm a huge Apple fan I think that Android will win out over iOS in the long run.
  3. Name:    volatility
    Descr:    An advanced memory forensics framework

    Not sure quite what I'll be doing with this but it caught my eye.  Hacking around at a low level in memory always brightens my day.
  4. Name:    damnvid
    Descr:    DamnVid, a video downloader/converter that sucks less.

    This seems useful for one of the django sites that I'm working on that needs to be able to download from YouTube.
  5. Name:    python-twitter
    Descr:    A python wrapper around the Twitter API

    Everyone's using Twitter and I don't even have an account yet.  I hope to use this to find ways to integrate it into my daily sysadmin tasks and maybe even dream up some killer apps using the API.