Adam Forsyth - Python Not Recommended [EuroPython 2015] [21 July 2015] [Bilbao, Euskadi, Spain]
Braintree is a Ruby shop. By default, we use Ruby and Rails for projects. We also use Ruby-based projects for much of our tooling, including puppet, capistrano, and rake. However, we strongly believe in using the right tool for the job. What that means has evolved over ti me, and I'll discuss what solutions we chose in the past as well as our current choices.
So what's it like doing Python at a Ruby shop? You get lots of jokes about language features Ruby has but Python lacks and lots of disbelief that Python will survive the 2/3 split. People also tend to apply the best practices and conventions of Ruby to Python code as if t hey were the same. Python's major inroad at Braintree has been, surprisingly enough, as a platform for high-concurrency situations. This is a direct result of the power of Tornado as a platform for asynchronous I/O. It also helps that many Python is very approachable and many developers have at least some experience with it.
Braintree has three pieces of our infrastructure using Python and Tornado -- an incoming request proxy; an outgoing request proxy; and a webook delivery service. They've served us well for 3+ years but all suffer from a number of problems. The outdated concurrency feature s of CPython / Python 2 as well as our lack of experience with and commitment to Tornado have always been an issue. As the meat of the talk, I'll speak in depth about the other issues we've encountered with each of the three applications and our short- and long- term solu tions to the problems.
The state as of the end of 2014 appeared dire for Python at Braintree. All the old Python code in our stack is on the way out, and Python has been specifically recommended agaist for new projects. Our Python client library is used by some of our largest merchants, and is ready for the future by supporting Python 2.6+ and Python 3.3+ in a single codebase. We also have a vibrant Python community at Venmo, our sister company. Both Braintree and Venmo support Python by attending, hosting, sponsoring, and speaking at meetups, conferences, and other events in Chicago, New York, and elsewhere. At Braintree, our Data Science team uses Python almost exclusively and they're becoming a bigger part of our business every day. We also use custom tooling written in Python to manage our infrastructure.