PyConES 2015

Marc Benet
Elements blog
Published in
6 min readDec 1, 2015

PyConES is the most important nation-wide Python conference in Spain. After two successful editions in Madrid and Zaragoza this third edition was celebrated in Valencia on 20th, 21st and 22nd of November, following the path of the international PyCon international. At this event Python professionals gather from all over the country to share ideas and improve their Python skills and learn from the best developers in Spain.

Elements didn’t want to miss that important event of the Spanish Python community and thus we decided to sponsor the event! It was a super nice opportunity to do a lot of networking with other Python colleagues and to let the community know about Elements and our work. Furthermore, we had the priceless company of Danae, our office manager here in Barcelona, in charge of all our public relations of the event and she made our stay at the conference way more comfortable!

If you want to see a quick summary of the most important ideas shared during PyConEs, keep reading :)

Python working environment

Yamila Moreno, founder of PyLadies Spain opened the event by offering a new PEP (the PEPA) for evaluating Python and its community in social terms. The main goal of the PEP is to evaluate the equity of opportunities in your workplace and thus allowing you to improve it afterwards. She also gave great tips on publishing job offers in a way that both male and female candidates react in the same way when they read the text in the job description. Something that our HR department is always looking after!

Standalone Django page using Backbone

In this workshop we had the chance to build a really simple Django application with a simple data model. Using Backbone’s engine we had the chance to load the pages using the browser’s memory and getting the information that has changed using a quick API connection with the Django backend. Here you can find the code from the organizers of the workshop.

Asynchronous programming with Python

There was a considerable amount of attention to this area of Python. To start with, on Friday we participated in a workshop to discover the new goodies that Python 3.4 has brought us with asyncio, which allows developer to write concurrent (not parallel) programs and minimize the impact of i/o operations to almost 0 of their performance. You can find a small development guide with asyncio in the official Python Documentation.

Other talks explained the benefits of Tornado and Twisted, specially if you program with Python 2.x, for which the asyncio module is not available. To this date, both Tornado and Twisted are more consolidated than their Python 3 counterpart, and their communities seem more mature for now, with more support. There are big differences between both of them, so be sure to give each one of them a good look if you need to chose one!

Putting aside the youth of asyncio, it is for sure going to be a major hit in the next months, as the Python community is developing new applications based on it as time passes. There is even a site devoted to put together all the different packages based on asyncio to the date: http://asyncio.org/. Do you care about performance? You should give this a look!

Interactive visualizations with Bokeh

Here we had the chance to check the powerful tools that Bokeh graphic engine has to offer. This graphic engine is specially oriented to manage big amounts of data and generate a very complex interactive design without writing a single JavaScript line (super cool for back-end developers who suffer of pain every time they hear the word ‘JavaScript’).

Scaling a website developed in Python (Django)

Scaling om Python also got a lot of attention at the conference. The talks regarding scalability were more oriented towards the architectural side than development. Let’s highlight some of the most interesting concepts and tricks for horizontal scalability:

  • Use load balancers right before your frontals. This will allow you to add and remove servers as needed (perfect use case for auto-scaling).
  • Locate all the I/O out of user requests whenever possible.
  • Move as many tasks as possible the background with Celery + RabbitMQ (for instance).
  • Move your cache to a separate server, then you will be able to share it among all your frontals, and scale it up as necessary.
  • Cache warm up of the main subjects using Python daemons or background tasks.
  • Doing searches using an ElasticSearch
  • Put your statics in a CDN with a super long expiration date and generate a new name per release dynamically, avoiding to use an old version.
  • Use multiple database reading copies, and keep writes in the master.
  • Can you cache something with Nginx? Then do it! Try to avoid hitting your API for repeated calls. Nginx can also provide a wrapper around your 3xx redirects and 5xx errors.
  • Always turn on and check the slow logs of your database.
  • Never take the isolation level of your database for granted, make sure you only use as much as you need, never more nor less.

Apache Storm as a Python application server

Apache Storm is a real-time processing system designed to scale horizontally simply and quickly secured processing. Even though this software is based on Java, it can run Python software and allows to create a micro-services oriented network that allows the developer to isolate the code in different nodes, so the server load can be split between them.

Other subjects of the conference

To name a few:

  • DLS’s parsing systems like an advanced text query system built in Lex and Yacc using PLY.
  • Queuing concepts made in many different ways like custom queues without celery or queuing using a Redis.
  • Deep reviews about meta programming in Python, like this example of what decorators can offer and a really interesting reading about meta classes.
  • Embedding Python in other languages. Here you can find an example in C.
  • Plone released their 5th version, with lots of new features.

Software efficiency

The last keynote of the summit was performed by Victor Terrón, software engineer at Google. He really is an advocate of pretty and efficient code, so he occupied most of the talk talking about those matters.

If efficiency is so critical, it is even more important to define how we measure it in our code. For sure it’s not valid to say that “in my computer it lasts 5ms”, we have to offer an empiric way to explain that. In order to respect the previous concept it is very important to always evaluate a code by the Algorithmic Efficiency Standards, that measures the code efficiency in terms of mathematics, as it defines it in a language that anyone can understand.

PyConES overall has been great: the event had a really good organization and everything went according to the plan. We had the chance to meet a lot of Spanish Pythonistas, share ideas and thoughts about software development and stay tuned to the newest development trends in Python.

That’s all! See you next time!

Follow Elements on Facebook, Twitter and LinkedIn!

Originally published at www.elements.nl on December 1, 2015.

--

--