List of useful Python libraries

If you are a .NET programmer, then you find Python a bit tough. Reason? Python does not include library for each and every operation possible in this world. You may have to work around to find the necessary packages, download them and continue with your development.

Python’s standard module list has a finite number of entries as opposed to .NET    ( I use .NET at my workplace). Here this is an attempt to collect all such libraries which are outside standard modules, which you might badly need for your development. Many of them are extensions or wrapper packages for already existing libraries.

1 ) scapy

This is a library for  TCP/IP stack wherein you can have full control over the lowest detail of the Packet that leaves your computer. It supports many protocols like ETH, IP, ARP, ICMP, TCP, UDP etc. You can create custom TCP/IP packet and send it to any host. Typical implementation is ARP Ping, ICMP Ping.

Experience: Tried. Works perfectly. Havn’t stumbled across any bugs as of now.

2) soaplib

Used for creating lightweight web services. As the page says, it comes with a client and server built in and on-demand WSDL generation.

Experience: Havn’t tried. Heard about it’s existence.

3) mysql

Uh? Do I really have to tell what this is actually. I hope everyone knows.

Documentation for python-mysql

Experience: Obviously! Obviously! I think I should remove this line.

4) aubio

Stating directly from it’s site – “aubio is a library for audio labelling. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. The name aubio comes from ‘audio’ with a typo”

Experience: None. Presently in To-Do List.

5) Beautiful Soup

BeautifulSoup is an SGML parser which is highly robust and doesn’t die straight-off even if you give it poorly formed data. To make it scream and die all you have to do is to give something that isn’t SGML at all. It even has a parser class named BeautifulSOAP which is used to parse SOAP message (as the name applies). It even has a class named ICantBelieveItsBeautifulSoup. Sounds stupid? Who cares as long as it does it work.

Experience: Tried when I saw Anomit using it. Need more experience as I have lost touch as of now. Never tried BeautifulSOAP.

6) python-clamav

It is pending in my To-Do list. Will start working as I get time.  Check a small tutorial

Experience: No! Read the line above.

7) python-crypto

Presently in #1 position of To-Do list. Sounds just too promising. Hope it is as I thought it to be.

Check the API and it’s general overview

Experience: No

8 ) django

Now if you don’t know django – Go shoot yourself or read about it here if you somehow survive.

[ As pointed by Anomit, it isnt a framework, but library is a general name I have used for the title ]

Experience: Obviously!

9) gd

I have used GD a lot in PHP, but hardly on Python. GD is simpler than ImageMagik (never used) as people told me. Hope to use this library if I ever require.

If you ever require the documentation, head yourself to this page.

Experience: Not used in Python, but in PHP

10) gmp

GMP stands for GMP Multi Precision and gmpy is a python wrapper over it. Though you might not need it in Python, but if you are coming from C background, this might be a familiar name.

Experience: Normal, not an expert

11) python-jabber

Python-Jabber is a python module which implements jabber instant messaging protocol. Check out the documentation and a funny example .

Experience: Little experience. Not much. After all it doesn’t look so tough, so will sit down for a hacking session,

12) python-irclib

I encountered this library when I was searching more on python-jabber library. This also falls in the category of real-time messaging. The problem I can see is that there is no documentation. How to proceed? Use dir() and inspect module extensively?

Experience: Kidding? Please show me the documentation. I don’t have more time for hacks as I did with scapy.

Till now ,I had kept this list for my own reference. Many more required libraries are missing. If you have any more in mind, please mention it. I would be glad to add it.

Advertisements

FOSS Industry Adoption

Probably I am not so much qualified to enlighten others on this topic, but this is what I can see from my eyes.

Praise Python! Praise Linux! Praise any other FOSS technology! Now go and check what is being used in the corporations. I would like to list them down a few – .NET, IE6 , ActiveX, Rational Suite, Lotus Notes etc etc.  Most of the technologies are either outdated or fully enterprise software. Half of them would be probably new for anyone.

.NET

Even when I was in college, all I used to hear was that .NET used to be an integral part of  their requirement of any company that hits the campus. Even in the Internship last year, .NET was the religion. Even in all the jobs around why is .NET so important? We hear so much about Python, isn’t it? Where is it? When will it be adopted as mainstream popular development language?

Don’t confuse between .NET and Python. When we say .NET we usually mean C#.NET. This language was responsible for the success of the framework. We even have IronPython, but hardly anyone uses it. (Please don’t bring VB.NET in between). One reason is that since all of the language having .NET bindings generate MSIL, the language doesn’t matter. Since C# has syntax very similar to Java, it becomes a preferred choice even for beginner and experts.

I personally don’t like the .NET runtime. It is slow and hogs the resources. Visual Studio sucks more RAM and resources than the OS itself(read Vista). It is slow in response, freezes a lot. (Please don’t give bullshit suggestions to get a 4GB RAM Module). The only positive thing is C# which is very familiar and is probably the best language from Microsoft.

To make Python more famous, we need to look out from the standard modules and create a huge collection of libraries and organize them in categories.  .NET has a bigger library for more functionality (makes it more heavy).

Source Control

ClearCase! I would keep my mouth shut over here, but the web interface sucks. Sucks bigtime! Doesn’t look like a web app in the first place. Upgrades are slow in enterprise and we are forced to use the old versions of any software which should be kicked out by now.

Why not subversion? I know some of my friends who say that their company uses it, but still ClearCase still has a big market share. Probably a big reason may be due to early adoption and a complete Suite. I have attended one conference of IBM Rational Suite in which I was really impressed by the way it was being explained. I hope people should get the point. Marketing matters as much as quality matters. Subversion may be excellent, but it needs an excellent  marketing to make it more appealing. A rock-solid support is also needed.

IE6

Probably nothing sucks more than IE6 when web is mentioned. The usage of IE6 is highest in corporate offices. Employees are forced to use this stone-age browser because either their company policies don’t allow or they don’t have admin privileges or the worst of all – The smart-ass programmers made the company’s intranet to work only on IE6.

Operating System

Do I even need to mention this? All companies have deals with the software giant for bulk licenses to keep their systems running. They strike special deals if they ever need *nix systems. This decision is usually taken after lot of brainstorming.

This post was not to show someone superior or inferior. Just my point of view! Your point of view goes down in the comments section.

Final Semester Project

I have been working on my Engineering Final Semester Project. We are required to make one big project and the time frame alloted is one complete semester! As everyone expects from me, I am using Free Softwares and Open Specifications for my project.

The technologies being used in my project are: PHP, MySQL, Python, SQLite and XMPP for the initial. More technologies can come into picture as and when required. So lets’s start with what am working on? Its a software development platform like Launchpad. Launchpad had their own source control management software(bazaar), then why cant I? My project has sub-sections as Source Control Management resembling a lot with subversion. I have a client and a server module coded in Python.

The data on the server is being stored using MySQL database and the client uses SQLite as database software. Apart from this we also intend to have a issue tracker which will be written in PHP and MySQL running over Apache. All the modules of this Software Development Platform would be tightly coupled with single login and User Access Control.

I am also into thinking that we need to have some IRC kind of real-time chat room where developers can collaborate to work together. Oh Wait! We can use an XMPP bot to keep a watch on the server. XMPP bot can be another frontend to handling your work just from an IM client. Developers should leave status messages related to specific projects so that visitors can know what work is being undertaken by the developers right now.

I am having a gala time working with Python, its an awesome language having short,precise syntax. If you have a good lightweight editor with basic auto-complete, you don’t even have to write anything. 🙂

I would be posting soon the experiences with Python and SQLite. Keep a watch!