Designing interfaces so that other code can interact with ours (whether our code is a library, framework, application, website...) is a very common and clearly crucial activity, but it's fraught with dangers -- there's a lot stuff we all keep doing wrong time after time. This talk shows some common categories of API design errors encountered in the wild, with tips on how to avoid them when you design your next API.
Goals: to show you how to focus resources and attention to help avoid mistakes in API design. Prereqs: experience designing and developing software, esp. software which needs to interact w/other existing software.
In a world of many programming languages, the popularity of Python continues to grow without bound. We examine what makes it special and how it influences the way we program:
by Jon Åslund
This is a story about how Spotify started, how we evolved, where we are today and how Python has always been a big part of our success. Where do we use it? Where do we not use it? Learn about the Unix way and the Debian way of maintaining a healthy love for Python, while two-timing with other languages such as Java and C++.
by Péter Szabó
Stackless Python and the greenlet package for CPython are two different implementations of coroutine support for Python. (Coroutines are fundamental building blocks of I/O frameworks like gevent, Eventlet, Concurrence and Syncless to conveniently handle thousands of socket connections at a time without creating threads.) Stackless and greenlet implement a different interface. However, each is powerful enough so that it can be used to emulate the other one. In this talk we explore the differences and discuss design decisions and testing strategies of the emulations we have implemented.
Gevent (http://gevent.org) is a coroutine-based library that enables you to write highly-concurrent network and web applications. Learn in detail what Gevent is, what it does and how it does it.
I will introduce a coroutine-based approach to network programming, explain it benefits and pitfalls.We will walk through the Gevent API, including the most recent additions, and understand how it is implemented. I will make a quick overview of the most interesting 3rd party add-on and applications after that.
What was my motivation for working with Python after two years of PHP? There is so much you can do. Functions are objects you can pass around, you can decompile functions to see how they work internally, you can alias a bound method to a global function and it will just work. You can change import semantics, override the method resolution order, you can write metaclasses, you can hook into the CPython interpreter API and much more.
Five years later I came to the conclusion that this is really not what Python is about and that a lot of what I did was interesting but not necessarily a good idea. This talk is a 45 minute recompilation of things I really shouldn't have done in the first place. Expect a bunch of neat and interesting hacks that showcase the possibilities of the language.
At ep.io we built a Python hosting platform from the ground up, designed to run large numbers of web applications on a small number of physical machines both securely and in a reasonably scalable way. This talk will show you how we built our infrastructure - using Redis, eventlet, PostgreSQL and more - and what lessons we learnt from our first few thousand deploys.
See how we split services into multiple processes and greenthreads; the pains of building a cooperatively-multitasking PTY module; how Redis isn't the answer to everything, but is still very useful; how to persuade third-party software to work securely in a shared environment; and how important it is to have good logging, especially when you have more than five servers.
by Wesley Chun
All of us are familiar with using open source tools to develop software applications with, but instead of writing code, it is also possible to create the manuscript of a book in very much the same way. These days, authors have many choices in terms of the tools which are available to aid them in writing a book. Gone are the times when the only option is using a proprietary word processor, so why not try it using open source tools? It's especially attractive to those who develop software using open source tools as well those who are writing books about open source tools. Both code and the written word are created in plain text files. These files are easily archived using some version control system. They can be shared easily via e-mail and can also be backed up in the same manner. In the end, the final product is shipped to the customer: in the case of software, it's distribution via CD or DVD, or perhaps a release for installation on a server, and for a book, it's delivering a manuscript to the publisher, perhaps in a format such as HTML or PDF®.
Upon some reflection, writing a book is, in many ways, similar to writing an application: you create text or code which is saved to a file (or files--typically one but could be more) file in some format, proprietary or otherwise. Additions, changes, or deletions are made to the file(s), which is then updated when the file is (re)saved. Backups need to be made, some versioning may be required to keep track of multiple files during the course of development, and finally, the resulting file(s) have to be delivered, as described above. Because of all the similarities described, we assert that it is possible to use a development environment utilizing Python and other open source tools to not only write application with, but also be able to create the entire manuscript for a book as well! While this entire concept should not really be mind-blowing, it does represent a trend seemingly growing in popularity in the open source world.
In particular, we highlight the following requirements that are necessary when creating a manuscript, especially with co-authors:
In this talk, we highlight one particular case study, the development of Addison Wesley's 2009 publication, "Python Web Development with Django", as well as provide some insight into other projects created using similar tools. Open source software has radically affected how applications are built today, and this phenomenon has the ability to affect the book publishing world in the same way.
by Claudio Desideri
In this talk I'm going to explain the main features and possibility that Panda3D gives us when we want to create a game from scratch. Then, I'll explain how the engine is structured and how it works conceptually going also through code examples and some practical operations.
It's meant for beginners who have also never worked with realtime graphics and the only prerequisite is a bit of python knoweledge including how to write a simple program and how to run it. The goal is to create a simple realtime application that take care of user input and reacts depending on it.
PostgreSQL (or “Postgres”) is an immensely powerful, incredibly extensible relational database, released under a permissive open source licence that is similar to that of CPython. PL/Python is one of PostgreSQL's standard server-side procedural languages, through which Python stored functions can be defined that can be called directly from SQL, quite seamlessly.
Play to the strengths of Postgres, by writing application business logic within the database in either Python 2 or Python 3. Enforce advanced business rules using Python, including constraints on both tables and database level datatypes (“domains”). By pushing the logic tier into the database, you can potentially greatly increasing your application's scalability by minimising the number of database roundtrips.
Includes case studies and topical coverage of PL/Python related enhancements in upcoming 9.1 release, and recent 9.0 release. The talk only assumes a very basic understanding of databases.
A teaser for the full tutorial on Tuesday: http://lanyrd.com/2011/europytho...
The PSF recently adopted a diversity statement. While some argue that we should do this just because it's "the right thing to do", others question why we, as a technical community, should even worry about diversity. This talk addresses the diversity question, not in moralistic or ethical terms, but in pragmatic ones. Studies on creativity and productivity demonstrate the potential benefits of diversity for the Python community. Making Python the best language it can be is not merely helped by increasing diversity, but may be dependent on diversity.
by Claudio Desideri
In questo talk spiegherò quali opportunità ci offre il game-engine Panda3D nel momento in cui vogliamo creare un videogioco da zero. Spiegherò com'è strutturato al suo interno e i concetti di base per capire come funziona, ma mostrerò anche prove pratiche e pezzi di codice.
Può partecipare chiunque abbia una conoscenza di base di Python, anche se non ha mai lavorato con applicazioni realtime 3D. L'obiettivo è mostrare come creare un semplice videogioco che risponda agli input immessi dall'utente e come utilizzare al meglio questo potente engine.
The talk will give an introduction to the concepts used in the Python Database API and relational databases in general. Connection, cursors and transactions are discussed, and their use in a typical Python database application are demonstrated. The talk will also touch upon some advanced database programming techniques and discuss best practices.
Messaging is a well established domain in information technology and can greatly improve the scalability and throughput of a system when employed appropriately. Message queues can be used to achieve
There is a huge number of messaging patterns identified in the industry  and a small selection of these will be presented to whet your appetite :-)
AMQP  is a fairly new and open messaging standard with a number of freely available open source message brokers (RabbitMQ , ZeroMQ , qpid  etc.) with different features and performance trade-offs.
In the course of the presentation you will be
* introduced to AMQP concepts and jargon
* introduced to available Python AMQP bindings (focussing on an asynchronous (txAMQP ) and a synchronous variant (most likely kombu ))
* shown code examples demonstrating how to use these Python bindings
The presentation (45 minutes in total) is structured as follows:
* 7.5 minutes for messaging concepts and patterns
* 7.5 minutes for AMQP concepts
* 5 minutes for an overview of the Python bindings for AMQP
* 10 minutes for txAMQP examples (asynchronous bindings)
* 10 minutes for kombu examples (synchronous bindings)
* 5 minutes for questions
This talk is the updated and especially enhanced of the "Python and PostgreSQL - a match made in heaven" talk of EP 2006, CERN, Switzerland.
PostgreSQL and Python share more then the first letter: their communities have great similiarities; their development processes are really comparable; their licenses and their openness to academics AND business (on a technical and communitie perspective) are big pluses.
We will have a look at those similiarities and learn why PostgreSQL is really the database sister to Python. There will be an overview of PostgreSQL, information of how to connect PostgreSQL and Python; how PostgreSQL streaming replication works and what it can do for you, how PL/Python helps to have Web 2.5 JSON storage and handling right inside PostgreSQL. We will show that YESQL is also a valid answer to many data storage qeuestions.
To Relate or Not to Relate, that is the question raised by the NoSQL movement. There is a lot of buzz about Couch, Casandra, MongoDB, and other non relational databases, and at the same time there are decades of hard work that's gone into optimizing databases built around the relational model.
I would actually argue that there is no such thing as a NoSQL database -- there are a variety of compelling options to relational database -- each of which have different features and different performance characteristics. So no one-sized fits all comparison will do. So, I'll try to outline a general taxonomy for persistence mechanisms, and then proceed to comparing relational DB's to their new friends in practice.
The talk will contain quite a few stories from the trenches with CouchDB, MongoDB, MySQL, Postgres, Tokyo Cabinet, ZODB, and other databases, and will help you think about the data storage needs of your applications in new ways.
Clojure is a modern Lisp dialect symbiotic with the Java Virtual Machine and designed for concurrency. Clojure is compiled to byte-code and yet is fully dynamic. It is very oriented towards functional programming and manages state change in a controlled environment with software transactional memory (STM). Since Clojure is a Lisp dialect, it retains the code-as-data philosophy and has a powerful macro system
Using the Jython, an implementation of the Python programming language written in Java, it is possible to call Clojure from Python and call Python from Clojure, using the JVM as an interoperability platform.
After a brief introduction of the main Clojure features, the presentation will show how Jython and Clojure can be used together.
No previous knowledge of Clojure (or Lisp) is assumed nor required.
La prima parte del talk introdurra' la storia di uWSGI, dall'idea iniziale alla messa in produzione dei primi lavori, fino alla sua inclusione nei progetti Cherokee e Nginx.
Seguira' una serie di esempi di deploy in ambienti ostili (a livello di sicurezza, non faremo deploy nella jungla) o con risorse fortemente limitate fino all'utilizzo delle funzionalita' integrate per il clustering.
Il talk si rivolge a tutti gli sviluppatori di applicazioni web che sono alla ricerca di un ambiente robusto e veloce per i propri lavori, o a chi gia' utilizza uWSGI e vuole
conoscere qualcuna delle nuove funzionalita' introdotte nel ramo di sviluppo.
by Pavlos Christoforou
Point Nine provides operations outsourcing and support to large and complex financial institutions.
As part of our day to day responsibilities we are required to process our client's trading activity which generally involves receiving data in various formats and through various protocols, apply transformations, validations and enrichment processes and distribute the resulting data to various third parties, in short Data Plumbing.
The goal of this talk is to introduce the audience to the (vast) field of financial data processing which we believe presents a tremendous opportunity for python and it's community and provide a brief overview of Point Nine's deployment of Python as the main framework for all data plumbing activities.
by Marc Garcia
Viri is a system for automatic distribution and execution of Python code on remote machines. This is especially useful when dealing with a large group of hosts.
With Viri, Sysadmins can write their own scripts, and easily distribute and execute them on any number of remote machines. Depending on the number of computers to administrate, Viri can save thousands of hours, that Sysadmins would spend transferring files, logging into remote hosts, and waiting for the scripts to finish. Viri automates the whole process.
Viri can also be useful for remotely managing host settings. It should work together with an application where the information about hosts would be maintained. This information can include cron tasks, firewall rules, backup settings,... After a simple Integration of this application with your Viri infrastructure, you can change any settings in the application, and see how it gets applied on the target host automatically.
The talk will cover next topics:
* Introduction to Viri
* Live demo on how to install Viri, write a Viri task, and execute it in a remote host
* Security concerns using Viri
Check Viri project page at: http://www.viriproject.com
In questo talk, mosteremo i tool e l'infastruttura che rende molto semplice la creazione di progetti Python in Ubunut, e la loro distribuzione a milioni di utenti. Verranno mostrati vari tool: Launchpad, Quickly e i PPA (personal package archiving).
by Ali Afshar
This talk will give an outline of the advances that Google have made in API delivery over the last year, and how it is relevant to you as a Python developer. The talk is suitable for beginners and advanced developers.
We will describe the underlying platform, and the built-in features that all Google APIs inherit.
We will focus on how the Python libraries for this API platform are generated and can be used as a single library that doesn't require updating with API updates, as Python lends itself perfectly to the nature of this platform.
by Andrew Dalke
It's impossible to use Python without learning about lists, dictionaries and tuples, and most people have at least heard about sets. These four collection types are so important and useful that Python has special syntax for creating them.
Fewer people know about Python's other built-in collection data types and algorithms. A deque supports fast appends and pops from both ends and is great for breath-first searches, the heapq module helps you construct a priority queue on top of lists, and the bisect module is handy for quick binary searches of an already sorted list.
The defaultdict uses the dict __missing__ hook as a better solution to setdefault, OrderedDict is a dictionary that preserves insertion order, and Counter is a dictionary specialized for counting hashable objects. A namedtuple is handy if you want to support both index and attribute lookups for the same item, and a frozenset is a hashable form of a set which can be used as keys in a dictionary or set.
My talk will go over these 8 different classes and modules. I'll give concrete examples of how to use them and why they are useful. The target audience is intermediate programmers who are familiar with the Python's standard data types and with data types in general, but who don't know all of the functionality available in modern Python.
by Wesley Chun
(if there are no more 45-minute speaking slots, 30-minutes will work too.)
The medical industry has long been dominated by custom software written by manufacturers of medical equipment. With the widespread use of lower-cost computing power and abundance of software developers using cost-beneficial open source development tools, it is no surprise that this is a rapidly-growing field in software engineering. In this talk, I will describe some of my experiences using Python and other open source tools, temporarily transitioning from the world of the web and Internet development, jumping into the medical industry, an experience much like being a fish out of water.
The experiences of working in this field, specifically developing software for use in clinical trials. We describe the use of open source tools for such software development, the required integration with closed-source software, and the documentation rigor that is necessary in a field under the jurisdiction of the US Food and Drug Administration (FDA). In particular, I'll describe direct experience in building an application for the use of analyzing spinal fractures and the various tools that make up the application suite, whose primary development language was Python. We will also discuss the particular role of the my employer at the time in the clinical trials process and elaborate on the data flow that was necessary for all medical applications developed at the firm, not just the one in particular.
by Michele Simionato
plac is general purpose tool than can be used to define command-oriented domain specific languages (DSLs). In its simplest form it can be used as a command-line arguments parser with an easier-to-use API than argparse. It can also be used to replace the cmd module in the standard library. Moreover it can be used to automatize functional tests and for much more. The talk will touch upon many use cases where plac can make your life as a developer simpler and better.
Technically Plac is a wrapper over argparse and works in all versions of Python starting from Python 2.3 up to Python 3.2. In Python 3.X it takes advantage of function annotations to define the parser in a declarative way, instead of the imperative way of argparse. In Python 2.X it uses decorators instead, to reach the same goal.
by Vincent Noel
Teaser for http://lanyrd.com/2011/europytho...
This talk will cover:
- How to use OAuth into your webapp so users can give permission to access their data stored in third party web application.
- How your webapp can interact with their Web API using RESTful JSON protocols.
This talk is suitable for beginners already familiar with any WSGI web framework.
This talk will be illustrated with code samples using Google App Engine and Google APIs client library.
by Ian Ozsvald
Teaser for full tutorial: http://lanyrd.com/2011/europytho...
A teaser for the tutorial on Wednesday: http://lanyrd.com/2011/europytho...
20th–26th June 2011