Showing posts with label awesomeness. Show all posts
Showing posts with label awesomeness. Show all posts

Friday, November 28, 2014

cool tool in django: inspectdb

Say you have a legacy database and you want to put django on top of it.  One line will construct python models for the database structure:

python mysite/manage.py inspectdb > mysite/myapp/models.py
You can then clean up the result as explained in chpt 18 of the Djangobook: http://www.djangobook.com/en/2.0/chapter18.html

Friday, November 7, 2014

Celebrating awesomeness: python request library and Uniprot

Uniprot makes is super easy to get protein sequences from a url.
The python request library by the awesome Kenneth Reitz makes it super easy to get the contents of a url.

Here's a screenshot from iPython: