Your current filters are…
In the last year we have been working on a full featured, Python powered, RESTful Web API. We learned quite a few things on REST best patterns, and we got a chance to put Python’s renowned web capabilities under review, even releasing a couple Open Source projects in the process. In my talk I will share what we learned. We will consider ‘pure’ REST API design and its many hurdles. We will look at what Python as to offer in this field and finally, we will dig further down by looking at some of the code we developed. Some of the technologies/stacks I’ll cover are (in no particular order): Flask, PyMongo, MongoDB, REST, JSON, XML, Heroku. Did you know? Like it or not, there is going to be a REST API in your future.
by Mike Müller
This tutorial provides an overview of techniques to improve the performance of Python programs. The focus is on concepts such as profiling, diffrence of data structures and algorithms as well as a selection of tools an libraries that help to speed up Python.
by David Cramer
Testing may be one of the more difficult concepts to pick up in a development cycle. With the complexities of large projects, and even small projects, writing effective, automated tests can take many times longer than writing the code and testing it by hand.
This talk will explore the various patterns of testing that DISQUS has implemented, and iterated upon over the last two years. It will describe how testing has been used to speed up the product lifecycle, improve stability through automation, and the culture shift required to get there. Most importantly, it will cover the practices that have been put in place that have helped ease the burden of writing tests.
by Ross Lawley
This intermediate-level class will teach you techniques using the popular NoSQL database MongoDB, its driver PyMongo, and the object-document mapper MongoEngine to write maintainable, high-performance, and scalable applications. We will cover everything you need to become an effective MongoEngine/MongoDB developer from basic PyMongo queries to high-level object-document mapping setups in MongoEngine.
by Kay Hayen
With Nuitka, for the first time, there is a consequently executed approach to statically translate the full language extent of Python, with all its special cases, without introducing a new or reduced version of Python.
It is compiled, but with practically 100% compatibility. Function dictionaries work, code objects exist, frame stack works, exception tracebacks, eval, exec, closures, nested functions, meta classes, etc. it’s all there, and behaves identical.
First, I would like to start out and explain how I came to write a Python compiler, why I want it to be 100% compatible, and why I find deviations from Python unacceptable and out of scope.
Then I would like to describe where difficulties were in the implementation, what Python constructs surprised me, and where the mapping from Python to C++ left things to desire.
In this project, I learned a lot about Python, it wasn’t easy to get the full CPython test suite to run. In doing that, I have learned anecdotes and fine details of Python, that are normally hidden in daily programming, but are still useful to know.
Esp. the work on re-formulating “with” statements, “assert”, “while"/"for” as generic loops, etc. gives an interesting view on Python itself. And I would like to present it, also for the insight it gives on Python.
I will give an overview over newly developed infrastructure, aiming for type inference at compile time, and show existing stuff. I will try and explain, why I hope to have picked the right approach in this domain.
An interesting side game, is the approach to use XML representations of the internal node tree of Nuitka to discover regressions/changes in the optimizer.
Then I will also present a project road map, with the milestones for Nuitka, and why I believe this is the right plan, and how Nuitka is different from projects like “Cython” and “PyPy”.
To round it up, I would like to make a demonstration of Nuitka, and give an example for how easy it should be to contribute.
As this will be the first time, Nuitka is introduced the PyCON EU (it was only shown on PyCON DE 2011 so far). And to celebrate that, the current GPLv3 license will be lifted, and replaced with Apache 2.0 license (ASF), which is entirely liberal.
In breve: - Seguiremo il tutorial officiale di Django, pero con la metodologia TDD - primo, i test! - Inclusi i test del browser stesso con Selenium - Anche “unit test” dei model, views e forms di Django - Discussioni della filosofia TDD: cosa testare, cosa non testare, come testare… - l’Italiano del speaker non e garantito perfetto, pero
“Test-Driven Django with Selenium” o “La capra di Test incontra il pony di Django”
Questo training sarà particolarmente per in principianti, o uno che vuol’ imparare un po di:
L’idea e di seguire il tutorial officiale di Django, dunque sarà dal punto di visto dal principiante, pero a ogni punto useremo la metodologia “TDD” - costruendo dei test prima dal coding del sito.
Non sara solo i “unit test”. Si comincia con i “functional” test, usando Selenium, che permette da usare un vero browser per testare le funzione del sito, dal punto di vista del utilizzatore.
Sento una domanda: Perché dovrò ascoltare a lui?
Son’ fortunato di avere iniziato la mia carriera con una compagnie di fanatici del “Extreme Programming”, una metodologia che domanda un devozione quasi-religiosa al test. La mia conversione non era facile, posso dire che ho chiesto domande ad ogni turno, “perché fasciamo cosi, perché non possiamo andare direttamente al coding” etc etc - e posso dire che adesso son proprio convinto. Ho imparato degli migliori, e ho tutta la passione di un neofita.
Questo training sarà anche la prima volta che l’ho fatto in Italiano, allora sarà sicuramente emozionante.
by Fabio Pliger
Optimization, testing, tunning and design in sw. project can be both heaven or hell for a sw. development project. Python provides many tools to deal with these topics but by theirselves they could not be enough. The talk tries to expose techniques, self failures/success and practical tips and hints to make the right choice at the right time.
This talk will expose optimization, testing, tunning patterns ( and other critical topics ) of a python project and try to analyze the options python provides ( such as packages, techiniques and patterns/anti-patterns ) to deal with them. There is not one true way to deal with these topics and the main goal of the talks is to provide practical examples/techniques and create an active discussion with the public.
Main discussion topics:
This talk shows some interesting patterns for large scale Flask applications and how Flask extension should be structured. It also dives into some of the more unknown helpers in the Werkzeug and Jinja2 base libraries.
The goal of this talk is to share some of the things that the documentation can’t explain well by itself. Required prerequisites: basic knowledge of how Flask operates.
In this talk we present PyPedia. PyPedia is an effort to host a Python programming environment in a MediaWiki content management system. The concept is similar to any wiki except that each article contains the documentation, python source code and unit tests for a known and well defined computational problem. Through an article, a user can edit the source code, download it, execute it locally, in a remote computer through SSH, or in Google App Engine (GAE). Moreover, through a python package users can import PyPedia methods in their local python environment. In the source code, a developer can simply call a function or instantiate a class that is defined in another article. In every code edit, the article’s unit-tests are evaluated in GAE before saving. A special parameters section allows editors to build an HTML form within the article that help fellow users to execute the method as a simple online service. Articles are divided in two categories: User and Main. In User articles, the creator of the article manages the edit privileges of each section. Any non-deliberately malicious content is allowed. Main articles are selected from the pool of User articles that exhibit highly qualitative content and can be edited only by trusted users. All content is under the simplified BSD license. The vision of this project is to create an encyclopedia of documented, executable and verifiable python implementation of common algorithms or computational problems through the development of a vivid community. Specialized or user aware content is also encouraged in the User namespace. The source code of PyPedia is available under the GPL v.3 license.
Video demonstration: http://www.youtube.com/watch?v=2...
by Fabrizio Toso
L’obiettivo di questo talk è quello descrivere brevemente come in azienda abbiamo utilizzato Python, QT, MySQL e altre tecnologie open source per lo sviluppo di un moderno ERP italiano, Konga http://blog.konga.it/. In particolare approfondiremo l’architettura del programma client, scritto completamente in Python e vedremo come sia possibile distribuire un’applicazione completa e cross-platform (Mac OS X, Windows e Linux) identica - o quasi - alle applicazioni scritte con i sistemi di sviluppo nativi. Particolare attenzione sarà dedicata all’integrazione di QT tramite l’uso della libreria “slewlib” e alla libreria utilizzata per la descrizione e la generazione dei report di stampa.
by fabrizio manfredi and Federico Mosca
The RestFS is an experimental project to develop an open-source distributed filesystem for large environments. It is designed to scale up from a single server to thousand of nodes and delivering a high availability storage system with special features for high i/o performance and network optimization for work better in WAN environment. The Restfs is pure-python, but several of the libraries that it depends upon use C extensions (sometimes for speed, sometimes to interface to pre-existing C libraries). The Project is on the beginning stage, with some technology previews released.
The main characteristics of the RestFS are : - Scalability, no limits on storage and clients size - High availability, no single point of failure and data replication - Adaptative, load balancing and uniform distribution - High Performance, parallel transfer, local cache consistency , data transfer by difference - Flexible, S3 compatibility interface, dedicated library for integration in web server and application layer
This talk describes the architecture, internals of RestFS and comparison among different free software solutions. The session will discuss our experience in this development and detailed information on performance and scalability
Any thing you want to ask Spotify how we handle millions of users and loads of played music?
Welcome to our Ask us anything -session, we’re more than delighted to answer to your questions!
Spotify is an award-winning digital music service that gives you on-demand access to over 18 million tracks. Our dream is to make all the world’s music available instantly to everyone, wherever and whenever they want it. Spotify makes it easier than ever to discover, manage and share music with your friends, while making sure that artists get a fair deal.
La buona notizia è che l’Agenzia del Territorio è in grado di fornire i dati cartografici e catastali ufficiali su tutta Italia in formato elettronico. La cattiva notizia è che tali dati sono distribuiti in vari formati proprietari scarsamente e malamente supportati dai software GIS di largo uso.
In questa presentazione mostriamo come leggere, validare, correggere e tradurre in formati standard (ad esempio shapefile) i dati del catasto terreni e fabbricati in formato CXF usando il potente stack di geoprocessing e format translation in Python. L’intero processo e numerosi dei singoli passaggi sono completamente generici e possono essere applicati alla lettura e traduzione di qualsiasi formato geografico proprietario.
B-Open ha recentemente rilasciato con licenza Open Source bgeo.catasto, una parte della propria libreria di parser e traduttori dai formati dell’Agenzia del Territorio. bgeo.catasto al momento supporta la lettura e traduzione dei dati catastali in formato CXF e dei dati censuari nei formati TER e FAB.
by Nicola Larosa
Take care of the most important thing, your psychophysical well-being, and be efficient about it.
You don’t need to be hungry (well, just a little bit), do lots of exercise (well, just a little bit) and spend a lot of time and money (well, just a little bit… uhm, there seems to be a pattern :-) ). You just need to take care of your body using the same thing that lets you program computers: your mind.
No, the human body is not “a machine”, as it’s often said: it’s much more complex than that. Nonetheless, knowledge of a few facts, some guiding principles, and some tech tools (we’re geeks after all, aren’t we? :-) ) can definitely improve your life.
Warning: this speaker is not a doctor, and this talk is not medical advice. Get the advice of a qualified doctor/physician before changing your diet and/or your physical regimen. Neither this speaker nor the conference organization will be liable for any injuries or illnesses you may incur by however applying the concepts discussed in this talk.
by Anders Hammarquist
When working with MongoDB, especially if you are coming from (or converting an application) the SQL world, you will probably miss the SQL transaction, which gives you, among other things, atomic writes.
MongoDB only provides atomic writes to one document. We will show you how you can implement multi-document writes that are, if all writers cooperate, consistent across multiple documents and either writes all changes completely or fail without writing any changes.
Audience: People who are looking at SQL alternatives, but still need some sort of transaction-like consistency. Understanding of parallellism issues, race conditions and deadlocks, may be helpful. MongoDB knowledge is not needed.
by Armin Rigo and Antonio Cuni
PyPy is probably the fastest Python implementation around, thanks to its automatically generated JIT compiler. This talk explains how the JIT works internally: in particular, it shows all the intermediate steps which lead to the compilation of the Python source into fast machine code, and how to use the right tools to inspect the output of the JIT compiler.
By examining the internals of the JIT, you will also learn why some code is more “JIT friendly” than other, and how to write programs which exploits its full potential.
Introducing a simple to deploy Python run-time which can be used to easily ship products based on Python, create custom private Python environments and have Python readily available without having to install it first.
The talk will give a short introduction on what pyrun can deliver, how it can be used and how to build it.
Camelot, as seen on EuroPython 2010 and 2011 is a framework for developing desktop database applications at warp speed. It is to desktop applications what Django is to web applications. Some see it as a replacement for MS Access, but its tight integration with SQLAlchemy enables a vast amount of more advanced features and possibilities.
This tutorial style course will enable you to get started with your own Camelot project. We will tackle the hurdles met when going through the lifecycle of a desktop application
by Simone Dalla
Can we put a new appointment on our Google Calendar with Python script? Yes, we can.
Can we get the list of our Google Documents with Python script? Yes, we can.
Can we create filters and labels on our Gmail account with Python script? Yes, we can.
Can we add a web page to our Google Site with Python script? Yes, we can.
Can we add, delete, modify users of our Goole Apps with Python script? Yes, we can.
Can we integrate our Python, Django projects with Google Apps? Yes, we can.
Go to show how Pyhton and Gdata library can afford to do and if Google Apps really loves Python…
Every application has its hotspots – small portions of code that consume considerably more resources than all of the other code combined.
Django apps are no different. Some pages, invoked with the just the right, or wrong input, can bring a server to its knees, hogging the CPU and taking many seconds, or in extreme cases even minutes to render. By keeping workers tied up, the whole system can then become slow to respond, or collapse altogether.
Many webservers have a crude built-in failsafe to prevent this. They automatically kill workers that fail to complete their requests in time. As a result, you may not fully appreciate, or indeed realize at all that you are routinely serving 500 pages, denying users access to your service, or leaving uncommitted database transactions – possibly even slowly corrupting data. Workers killed by force leave virtually no forensic traces and so even when issues are suspected, it’s hard to pin them down.
The cause behind these hotspots can be poorly generated SQL queries from the ORM, an algorithm with non-linear complexity, excessive disk or network IO, or lock contention in the database – to name just a few.
Oftentimes these problems escape a developer’s attention, as dev and test environments simply don’t have the dataset, level of concurrency or sheer size of the real thing.
In this talk we’ll address the challenges of tuning your Django app with continuous automatic runtime inspection tools, including homegrown Dogslow. We’ll uncover the pages that consume disproportionate amounts of time and cycles to complete and the pages that get killed altogether.
We’ll discuss several ways to help you identify and eliminate the hotspots, both passively through monitoring exclusively, as well as actively by selectively interrupting workers before they get killed and examine how to effectively interpret the automatically collected forensic evidence.
I’ll explain how a genetic algorithm written in Python solves musical exercises used to train composers. I’ll also embarrass myself by comparing the computer generated results with solutions by the composers Johan Joseph Fux and Wolfgang Amadeus Mozart. The presented project is a fun “brain break” based upon work I originally started at university.
No prior musical knowledge will be required as I intend to explain just enough musical theory for the audience to understand the nature of the problem (although I’ll assume familiarity with Python).
Rapidly updating the requirements and implementation of a machine-to-machine communication protocol is hard in itself, and keeping a protocol specification and documentation up-to-date is always a burden, and sometimes becomes an impossibility.
At Visual Units, when this became a problem with the protocol between the embedded software and the fleet management server, we changed the approach and specified the protocol in Python. This allows us to use the specification directly when generating and parsing messages, as well as making it possible to generate protocol documentation, and source code for our Java (J2ME) client software. We implemented everything from scratch, and found it surprisingly easy to do without documentation and specifications external to The Code.
This talk will focus on lessons learned and pitfalls found during the implementation of this solution, with code examples from our current state of art as well as showcases of some of the mistakes we made and the types of magic used in different iterations - most notably metaclasses and the inspect and imp modules. It will follow the evolution from the first (quite horrible) attempts, to our current implementation. I will also discuss what has been gained by adopting this solution and the tradeoffs that we have made.
The intended audience is developers and designers who work with and design protocols, as well as developers with a general interest in code as specification. This is not a presentation of a framework for use in any application (although code is available), but an in-depth look at how far you can go with custom-built tools.
Presenting a better way of using PostgreSQL from python with
This is achieved by the following:
Some more infrastructure is presented which is needed for using code-shipping in more complex scenarios like django
These days it is difficult for software to meet users’ expectations to behave intelligently. When a program displays a lack of even the most basic awareness of context it is jarring. At the same time organisations are seeking to gain a competitive advantage through software that behaves adaptively based on the information at hand. Solving these problems is a challenge for today’s developers.
There is general agreement among seasoned developers that having a good understanding of basic computer science data structures and algorithms is essential. That said there is one sub-section of algorithms that is underused by most developers, the algorithms that fall under the general rubric of Artificial Intelligence. This talk aims to remedy that by providing a quick refresher course on basic AI algorithms using Python. This talk is not about building thinking machines, but rather about creating software that users won’t think is stupid. Basic AI techniques such as Constraint Propagation and Identification Trees, can really help developers along the road to smarter software.
by Valerio Maggio
The clone detection is a longstanding and very active research area in the field of Software Maintenance aimed at identifying duplications in source code. The presence of clones may affect maintenance activities. For example, errors in the “original” fragment of code have to be fixed in every clone. To make things worse, code clones are usually not documented and so their location in the source code is not known. In case of small-size software systems the clone detection may be manually performed, but on large software systems it can be accomplished only by means of automatic techniques.
In this talk an approach that exploits structural (i.e., AST) and lexical information of the code (e.g., name of methods, variables) for the identification of clones will be presented. The main innovation of such approach is represented by the adoption of a Machine Learning technique based on (Tree) Kernel functions. Some insights on mathematical properties of these Kernel-based method along with its corresponding (efficient) Python implementation (Numpy, Scipy) will be presented.
Afterwards the talk will be focused on the explanation of some detection results gathered on well-known Python systems (Eric, Plone, networkx, Zope), compared with other non-Python ones (Eclipse-Jdtcore, JHotDraw). The aim of this part will be to analyze what are the Python features that could possibly avoid (or allow) duplications w.r.t. other OO languages. Some snippets for analyzing the Python code “by itself” will be also presented, emphasizing the powerful Python built-in reflection capabilities, extremely useful in this specific code analysis task.
Basic maths skill and basic knowledge of the Python language are the only suggested prerequisites for the talk.
by Armin Rigo and Christian Tismer
This talk gives a good overview of the status of Stackless Python:
Its history from the beginning, its current status and its future development to be expected. A discussion and comparison with similar approaches like Greenlet, Eventlet and how they relate is also included.
Stackless Python 1.0 was started in 1998 as an implementation of true continuations, with all implied complications.
In 2002, Stackless 2.0 was born, a complete rewrite. Continuations were abandoned in favor of the much easier to comprehend tasklets - one-shot continuations that could resume their current state just once, like Coroutines.
In 2004, Stackless 3.0 was created, which merged the 2.0 features with a new concept: so-called “Soft-Switching”, which made the Pickling of Program State” possible.
As a consequence, a few recent application make solely use of Program State Pickling, which changes the purpose of Stackless Python quite a bit. One example of this is the “Nagare Web Framework” which will be shown in examples.
In the light of the popularity of a Stackless spin-off, called “Greenlet”, the concept of a new Stackless branch will be depicted: Stackless, written as a pure extension module on top of Greenlets, which includes State Pickling - a feature that seemed to be impossible to implement without changing CPython.
But the impossible and ways to get around it was always a major topic in this project, which is going to augment what Stackless on PyPy already can do.
by Ezio Melotti
Working with Unicode and encodings might be confusing, but every developer must know how they work. Even if the full Unicode standard is actually quite complex, only a few basic concepts are really necessary to work with Python and Unicode: - the differences between Unicode strings and bytes; - how encodings are used to store characters; - the differences between different encodings; - how to understand Unicode-related errors;
This talk aims to explain these concepts. Best practices for using Unicode, the current status of Unicode in Python 2 and 3, and latest Unicode-related updates (e.g. PEP393 - Flexible string representation) will also be discussed. The talk is suitable for both new developers that are not yet familiar with Unicode and for experienced developers that want to understand better what’s going on under the hood.
by Roberto De Ioris
uWSGI oltre a fornire un ambiente per eseguire le vostre applicazioni python/WSGI, offre una serie di funzionalita’ che estendono le possibilita’ dei vostri progetti. La api di uWSGI esporta funzioni per gestire il tempo, i task asincroni, il monitoraggio dei file e tante altre robe divertenti che vi eviteranno di istallare tonnellate di grassi demoni o dire di “no” al cliente. Il talk mostrera’ vari utilizzi della api (in ordine di complessita’) e qualcuna delle nuove features in sviluppo
by Lynn Root
Are you a woman wanting to break into the engineering field? Or do you know any women wanting to learn how to code, but don’t know how to help them? Perhaps our nerdy ladies are a bit shy too ask for help. That’s okay! I’ll give you some tools to nudge you in the right direction.
In this session, I’ll be talking about how I increased women’s engagement in the Python community though demonstrating how versatile the language is with practical projects, by creating a safe space for women to learn and to fail, and by encouraging involvement beyond the classroom.
2nd–8th July 2012