Live data from Hacker News

'New' Python modules of 2015

blog.rtwilson.com

41–50 of 137 posts

Re: 'New' Python modules of 2015

#41
post #17

Earlier quoted context omitted.

Could you name it?

This is probably what he meant: $ py Python 2.7.8 |Anaconda 2.1.0 (64-bit) ... on win32 >>> import bsddb >>> print bsddb.__doc__ Support for Berkeley DB 4.3 through 5.3 with a simple interface. For the full featured object oriented interface use the bsddb.db module instead. It mirrors the Oracle Berkeley DB C API.

also, no unicode keys for this or shelve in 2.7 which really causes some coding pain. (not sure about 3.X)

Re: 'New' Python modules of 2015

#42

Not really 2015 but Q! https://pypi.python.org/pypi/q Print-debugging on steroids. This really does make things so much easier, especially when dealing with huge apps you don't have time to learn. Not just useful as a dev but also as a sysadmin.

What's the advantage of Q over pdb?

Re: 'New' Python modules of 2015

#43
post #26

I'm feeling a lot of love for Pandas. Any (biology related) project I work on starts with multi-headered dataframes and ends in beautiful Seaborn graphs. In combination with Jupyter notebook I breeze through large data sets while leaving a perfect trail of what goes on in the data pipeline. Python is great.

Seaborn is great for visualization; it basically packages up some of the more specialized R plots for MPL. The other thing I really love about it are plotting contexts, which make it really easy to properly size and format the same plot for e.g. a poster and a paper.

Interestingly enough, my biggest use of Pandas is to serialize to and from HDF5. I work with a lot of large datasets and Pandas simplifies using HDF5 quite a lot.

Re: 'New' Python modules of 2015

#44
post #28
post #17

Earlier quoted context omitted.

This is probably what he meant: $ py Python 2.7.8 |Anaconda 2.1.0 (64-bit) ... on win32 >>> import bsddb >>> print bsddb.__doc__ Support for Berkeley DB 4.3 through 5.3 with a simple interface. For the full featured object oriented interface use the bsddb.db module instead. It mirrors the Oracle Berkeley DB C API.

bsddb is deprecated as of python 2.6 and removed in python 3

That particular back-end is deprecated, but the same API is provided by the dbm/gdbm/dumbdbm modules. Those still exist in Python 3, although they've been consolidated under one top-level module.

Re: 'New' Python modules of 2015

#45
post #13

The Python module I learned to love this year is Click. Gets me better command line interfaces fast. URL is http://click.pocoo.org . It does progress bars too...

docopt was inspiring in its own way, but click was 'simpler' do toy with.

I find click to be much more natural too. Docopt was always touchy about more complicated CLIs when I used it (probably because a lot of "magic" happens behind the scenes), whereas click lets you drill down and arrange things just so. It also feels very well designed, hats of to Ronacher as usual for being good at designing Python libraries.

I also find myself using click even when I don't want a CLI. The pretty-printer (`secho`) and progress bars are extremely handy, plus some of the other stuff in utilities. It's quite nice that they handle detecting when output is an interactive terminal versus piping to a file.

Re: 'New' Python modules of 2015

#46
post #42

Not really 2015 but Q! https://pypi.python.org/pypi/q Print-debugging on steroids. This really does make things so much easier, especially when dealing with huge apps you don't have time to learn. Not just useful as a dev but also as a sysadmin.

What's the advantage of Q over pdb?

They don't do the same thing. Q does printing. import q; q(var) -> prints var to /tmp/q, with syntax highlighting, separate files for big output, etc. It can also do lots of other cool things, cf 1-page documentation in the link. :)

Re: 'New' Python modules of 2015

#47
post #12

I am using Scrapy a lot. http://scrapy.org/ It is very well designed web crawling library.

I found out, through reddit a couple of days ago, about Pomp:

https://bitbucket.org/estin/pomp

It looks like a much cleaner Scrapy-inspired spider framework, without the twisted dependency. And it's python 2+3 compatible. I'm very excited to try it out.

Re: 'New' Python modules of 2015

#48
post #33

Earlier quoted context omitted.

So I have been considering this. does conda track pypi or does it lag it? I have been concerned about moving over my requirements.text for a webapp with lots of dependencies

It slightly lags, but you can include pip requirements in an environment.yml file, and they install normally. I really only use conda for the non-python bits of our stack: numpy/scipy/pandas etc - packages that are a pain to install on Heroku.

It's also pretty straightforward to set up your own Conda package tree. Nice for packaging your app for deployment or making sure you have very precise dependencies.

http://conda.pydata.org/docs/custom-channels.html

Re: 'New' Python modules of 2015

#49
post #33

Earlier quoted context omitted.

So I have been considering this. does conda track pypi or does it lag it? I have been concerned about moving over my requirements.text for a webapp with lots of dependencies

It slightly lags, but you can include pip requirements in an environment.yml file, and they install normally. I really only use conda for the non-python bits of our stack: numpy/scipy/pandas etc - packages that are a pain to install on Heroku.

They are a pain to install on a desktop as well!

Especially with all the blas linking. Was there anything special you had to do or was it simply conda install numpy-blas or something like that ?

Post reply on HN