PyCon 2017 in Portland, Oregon showcased excellent presentations featuring everything under the hood of the Python programming language. From general overviews of Python best practices, to niche talks about new tools and libraries, this was a really great experience for anyone interested in Python and coding. From Python beginner to Python expert, there were talks targeted to all skill levels. For those who couldn’t attend, you can watch all the talks on the PyCon Youtube page.
Below are four of our team’s favorite talks from PyCon 2017, along with links to their videos.
1. Modern Python Dictionaries — A confluence of a dozen great ideas – by Raymond Hettinger
A favorite of Excella Python Lead Mike Brown
When Raymond Hettinger shows up in a conference schedule, he always draws a big crowd. He has a reputation in the Python community for giving well prepared talks on Python fundamentals. One of my favorite talks of all time is Raymond’s 2015 PyCon talk Beyond PEP8, where he skillfully transitioned the focus from Python syntax conventions (PEP8) to the importance of understanding “Pythonic” programming.
At this year’s conference, Raymond decided to dive deep into the history of dictionaries, a fundamental data type in the Python language. As a Python core developer and a contributor to the dictionary code itself, Raymond is certainly someone worth listening to on the topic.
Raymond covers how the implementation of dictionaries evolved over the years, adding tweaks to either increase speed or reduce memory consumption. His topics weaved between basic information on how dictionaries work, little known facts about optimization, and general humor, which kept the talk informative without being mentally overwhelming.
Anyone that watches Raymond’s talk will certainly learn a thing or two about how dictionaries are implemented in Python. More importantly, the talk uses a core piece of Python functionality to showcase the benefits of iterative development.
2. Share Your Code! Python Packaging Without Complication – by David Forgac
A favorite of Excella software developer Adam Zarger
David’s talk was aimed to help regular developers package and share their code. The major takeaway from this talk was a tool called cookiecutter.
Cookiecutter offers standard templates and structures for packing up code to export as a package. Not only does this include templates for the standard metadata (who wrote the code, version, contact information, etc), but also it has structures in place to include automatic unit test running and code analytics. Using cookiecuttter simplifies the administrative details of packaging and cookiecutter has plenty of helpful hooks for continuous integration and unit tests. Cookiecutter takes more than half of the work out of writing open source packages and automates it for you, so you can focus on writing solid code for the open source community.
3. How to Write a Python Transpiler by Russel Keith-McGee
A favorite of Excella software developer Vic Kumar
Did you know you could write Python and have it compile to Java and work? Me neither. But, thanks to the voc library, you can. Why would I want to do that? Good question. As Dr. McGee explained in his talk last year, Python and IOS applications already share the same C compiler, Clang, and mapping calls between the two isn’t difficult. In fact, it’s already possible using the umbrella BeeWare project. So, okay, technically it is already feasible to write a native IOS app in Python, but perhaps not so practical.
Clearly, what we want to do is write both native IOS and Android applications in Python. That would be great! Android apps, though, use Java. Enter transpilation and voc. This talk is fairly technical, and explains how Python intermediate byte code instructions are translated into similar byte code in Java. The BeeWare suite, in the last year, moved away from pure byte code mappings to instead examining Python’s abstract syntax tree (AST), for example.
The idea of writing native mobile applications in Python is amazing, and hopefully this will be a project that is soon ready for production use and widely accepted as the norm. BeeWare’s team sprinted on the voc transpiler for all 4 days of PyCon’s sprints and had, arguably, the largest following of new developers on their project.
4. Level up! Rethinking the Web API framework by Tom Christie
A favorite of Excella software developer Vic Kumar
Tom Christie is best known for authoring the Django Rest Framework, but his current project, which he introduced at PyCon 2017, is called APIStar. APIStar’s story began when Python 3 introduced optional static typing. Projects like Hug Api, which runs on Falcon, was first to the scene as a minimal framework that takes advantage of this static typing to make our API layers self-documenting – much like what swagger can do for a Java API. APIStar follows the premise of Hug, but has more ambitious goals in terms of the features it will offer. For example, APIStar plans to integrate with SqlAlchemy for ORM support, and Alembic for migrations support. APIStar also plans to integrate with Django framework. Tom’s talk outlined some of these goals, but also focused on the general direction of how modern API’s are being built in Python. With APIStar, you can map your schema definitions directly into JSON Rest API’s, which is pretty nice and convenient. Much like the Django Rest Framework, it is painless, easy to use, just works right out of the box, and supports everything you might already use in Python.
Tom Christie and others are also trying to figure out the future of asynchronous operability in Python APIs. If you ever wished for a marriage of the uvloop library with gunicorn to make it more asynchronous, then I can tell you that you are not alone; the name “uvicorn” is already gaining traction. This direction and much, much more were very seriously discussed at PyCon, and these discussions reinforce the openness of our community in adapting to new ideas and paradigms.
If anyone held doubts about the next generation of RESTful API’s, and whether Python will remain competitive, those concerns can be laid to rest. The Twisted, Tornado, Flask, APIStar, and Falcon projects were all participating in PyCon’s Sprints, looking for open source contributors, and looking to move the bar forward for great Python API’s.
Out of all the PyCon 2017 talks, these were our favorites. We encourage you to watch as many of these talks as possible, because, frankly, they are all fantastic. The Python team at Excella hopes you can find a few that are helpful for your next Python project.