Live data from Hacker News

'New' Python modules of 2015

blog.rtwilson.com

131–137 of 137 posts

Re: 'New' Python modules of 2015

#131
post #112
post #34

Earlier quoted context omitted.

We have to use a mix of pypi and conda since quite a few of our dependencies are not in conda. We have a script which checks conda first, then falls back to pypi, all from one requirements.txt

Any chance you can share that script? I'm looking for something similar, since I too am using both conda and pypi for dependencies.

https://gist.github.com/dwiel/7a2c0163b802e1cea0f6

Instead of requirements.txt we use py.prereqs, but otherwise this script should get you close.

Re: 'New' Python modules of 2015

#132
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.

Pandas are great. Looking forward to Dask.

Re: 'New' Python modules of 2015

#133

Earlier quoted context omitted.

One word - isolation. One issue with using your system's packaging system is that a lot of system utilities are written in Python which makes it harder to play around with new versions, bleeding edge libs, etc.

Virtualenv is pretty good for isolation.

Not for binary packages, which usually end up requiring libraries installed into /user/local (and let's not get started about the mess that is Python binary deployment on Windows).

Re: 'New' Python modules of 2015

#134

"python-bond" also came out in 2015: https://pypi.python.org/pypi/python-bond allows a simple interface between python runtimes and php/perl/nodejs.

There is a lot of overlap between these languages, and I wonder what any of them can do that can't be done in pure Python.

Re: 'New' Python modules of 2015

#135

Hands down, my favorite new library is schema: https://pypi.python.org/pypi/schema Here's a schema I use in production, see how readable it makes the parameters of the API and how quick all the validation and normalization is: https://www.pastery.net/mhwwnv/ At the end, you get an object called data, and you can do data.title, data.language, etc, and be sure that everything is as you expect.

What's the difference between these sort of libraries and an ORM? Don't ORM's provide built in validation and serialization?

They are useful when you want backend-independent orm (say you want to save your objects as JSON in ceph in deployment, and in sqlite in development)

Re: 'New' Python modules of 2015

#136
post #134

"python-bond" also came out in 2015: https://pypi.python.org/pypi/python-bond allows a simple interface between python runtimes and php/perl/nodejs.

There is a lot of overlap between these languages, and I wonder what any of them can do that can't be done in pure Python.

It's not much about language, it's mostly about code/ecosystem re-use (that is: if you have a library available in system X and you're writing for Y you can still take advantage of it).

Re: 'New' Python modules of 2015

#137

Earlier quoted context omitted.

What's the difference between these sort of libraries and an ORM? Don't ORM's provide built in validation and serialization?

They are useful when you want backend-independent orm (say you want to save your objects as JSON in ceph in deployment, and in sqlite in development)

I thought most ORMs were back-end independent. Isn't that 1/2 of their value proposition? The other half being accessing a persistence layer in native code.
Post reply on HN