ruk·si

🐍 Python
Packages

Updated at 2013-12-08 01:30

This note contains some worthy Python packages that I should try out or as a reminder when I need them again.

pytest: Testing framework for Python.

freezegun: Allow controlling time for tests by mocking the datetime module.

Requests: Doing HTTP requests much better than urllib2.

Celery: Use Celery for asynchronous and automated tasks. All calls that don't need to be done this instant should be stuffed to a Celery queue e.g. sending email.

Celery tasks can also be timed so no need for scheduling cron jobs.

Use a fast memory based database for Celery backend e.g. Redis.

click: Define help messages and interface for your command-line interface.

pyquery (with lxml): Parsing HTML in jQuery like syntax, fast.

lxml: More robust handling of XML and HTML.

fuzzywuzzy: Comparing fuzzy strings.

Structlog: Handling your logging and making them more readable.

Scrapy: Web data mining/scraping package.

Flask: A simple web framework.

If you are doing heavy array and matrix operations, use NumPy / SciPy / Pandas.