By : Rakesh Vidya Chandra

When we want to fetch internet resources we tend to use urllib2 but when dealing with "HTTP basic Auth" urllib2 is pretty unintuitive and painful.

We can use urllib2.urlopen() to open the URL which can be a string or a request object, but the factor of the matter is that implementing anything beyond that is a bit troublesome.

Wouldn't it be a delightment, if we can use the GET, POST, PUT, DELETE with a single function call with the URL and auth data as parameters?

So Python-requests brings this delightment to life by extending the HTTP capabilities.

Python-requests ...

more info..

Three underutilized python commands

By : Shabda Raaj

Today's post are three simple Python commands which should be known more widely, but are not.

Start a simple web server to serve files from current directory.

~$ python -m SimpleHTTPServer
Serving HTTP on port 8000 ...

This is neither secure, nor scalable, but handy if you are in a directory and want to quickly test something.

Testing emails

~$ python -m smtpd -n -c DebuggingServer

Starts a fake SMTP server on port 1025. Useful if you are testing emails on a system which doesn't allow pluggable emails backends.

Pretty print JSON

echo '{"2legs":"Better", "4Legs": "Good ...

more info..
Topics : python tips Python

Continuous integration with travis and for Django apps

By : Rakesh Vidya Chandra

Maintaining a solid rapport with the ongoing software development process always turns out to be a walk on air. Ensuring a software build integrity and quality in every single commit makes it much more exciting.

If the current software bulid is constantly available for testing, demo or release isn't it a developer's paradise on earth?

Giving a cold shoulder to "Integration hell" the 'Continuous integration' process stands out to deliver all the above assets.

What's Continuous integration?

Continuous integration is a development practice that requires a developer to integrate code into a shared repository in which isolated ...

more info..
© Agiliq, 2009-2012