Live data from Hacker News

The Incredible Growth of Python

stackoverflow.blog

151–160 of 224 posts

Re: The Incredible Growth of Python

#152
post #109

Earlier quoted context omitted.

pip install -r requirements.txt Pretty simple, no? Most any python project I have seen in the last 5-6 years uses it.

requirements.txt don't track transitive dependencies. Your project could break if a dependency decided to swap out its own dependencies. This isn't theoretical either - it happened to us in production. We are using `pip-tools` to manage that: https://github.com/jazzband/pip-tools

What do you mean? `pip freeze > requirements.txt.lock` will freeze all your current deps, including transitive.

Re: The Incredible Growth of Python

#153
post #127

As someone who works with Python every day, this isn't surprising. I forget where I heard/read it, but someone made the claim that Python is the "second best language for everything" (paraphrasing) and I couldn't agree more. Need to create a web app that interfaces with a data pipeline? Python/Django/Flask is perfect. There are countless other examples too.

I agree that Python works well for just about everything but wish there was a framework between Django & Flask.

Agreed! I lean much more towards Flask (I'd rather have too much simplicity than too much complexity), but something in the middle would be fantastic.

A simple application structure with loose enough rules and a strong standard library is what I would like. Flask can be too little, Django can be too big.

Re: The Incredible Growth of Python

#154
post #139

I know I shouldn't feel that way, but as a developer who loathes Python, this is a painful read. I start to feel that if I can't fight the trend then I should join it. But then every time I try Python, I feel such unease because of the low performance and the dynamic typing. It's just something I don't understand... this is really depressing to me.

You're not alone. The only place I like Python is as a replacement for shell scripting.

Re: The Incredible Growth of Python

#155
post #127

As someone who works with Python every day, this isn't surprising. I forget where I heard/read it, but someone made the claim that Python is the "second best language for everything" (paraphrasing) and I couldn't agree more. Need to create a web app that interfaces with a data pipeline? Python/Django/Flask is perfect. There are countless other examples too.

I agree that Python works well for just about everything but wish there was a framework between Django & Flask.

Have you looked at: http://www.django-rest-framework.org/

and the Lightweight Django book: http://shop.oreilly.com/product/0636920032502.do

Re: The Incredible Growth of Python

#156
post #147

Earlier quoted context omitted.

I work at Karolinska as the sole developer on a data browsing platform, inside a neurobiology research group. The entire department is either using or learning Python. Of course, the work environment itself is a severe form of selection bias, but there definitely has been an uptake in Python among scientists. (Which leaves me kinda sad, because I like Julia more - I'm sure it will keep growing though)

Julia is definitely a step up in data science programming. It's purpose built for data science. I guess that's also the reason why Python has grown more than Julia. The likelihood of someone having worked with Python in an unrelated field means that when starting out in another field, if the Python option exists, they are probably going to take it. Apart from that, if one is just getting started out in data science a…

The problem is that data science, often, isn't just data science. It might involve doing a bunch of activities that are strictly not data science - scraping data off the web (Python has requests), visualization for some understanding (Python has dozens of nifty libraries), store data in a small db (Python works nicely with sqllite, among others), convert all of this into an app (Python has Flask, again among others).

R's data frame concept was fantastic for those transitioning from 'spreadsheet' analysis but with Pandas, Python has improved and enhanced this concept even further.

This is just one example but I think it is this versatility that makes it more attractive than R or Julia.

Re: The Incredible Growth of Python

#157

Python 2 advocates were quite firm in telling us that Python 3 and its incompatibility with Python 2 had killed Python and people would abandon Python altogether in droves for other languages. This post is suggesting the opposite, that Python is more healthy than ever and growing incredibly fast.

That's not the way to look at this. The control you would need to establish whether what you are saying is true is a world in which the 2/3 split never happened. And in that world Python is most likely doing even better than in this one...

They fucked up. That Python is resilient enough to absorb such a blow and that no other language is a viable alternative for that particular niche is what saved the day.

And even now there is still plenty to improve on, fortunately Anaconda at least makes package management more sane.

Re: The Incredible Growth of Python

#158
It's multiple reasons why Python is gaining traction again. One of them is definitely due to all the data science that uses it.

The second though is that schools are also making the switch from Java to Python as their first language.

So the folks learning are searching for a bunch of packages and I suspect a number of the easier questions.

Re: The Incredible Growth of Python

#159
post #109

Earlier quoted context omitted.

requirements.txt don't track transitive dependencies. Your project could break if a dependency decided to swap out its own dependencies. This isn't theoretical either - it happened to us in production. We are using `pip-tools` to manage that: https://github.com/jazzband/pip-tools

What do you mean? `pip freeze > requirements.txt.lock` will freeze all your current deps, including transitive.

This is only practical if you only have one set of requirements.

If you have multiple sets of requirements (for dev vs testing vs production, eg), this becomes impractical real quick. You'll essentially have to tear down and rebuild your dependencies multiple times to update your reqs.

Re: The Incredible Growth of Python

#160

Earlier quoted context omitted.

You're going to have a hard time supporting multiple versions of Python that way. If I started a new package today I would target 3.4, 3.5, 3.6, 3.7-dev, and likely, 2.7. A lot of well maintained packages have different dependencies based on the exact version of Python. If you're crazy enough to support 2.6, then there will be a lot of additional packages in pip freeze. Ideally, packages would have just one set of de…

Just target 3.4+ then... Why would you sort 2.6 in 2017? Supporting 2.7 these days in a new package is already a bit of a wtf - Django for example drops support for it next year.

For the industry I work in, because of this: http://www.vfxplatform.com

We're still maintaining stacks on py 2.6 which predate the reference platform specs

Post reply on HN