List of videos

Martin Angelov - Proper Django Testing
Proper Django Testing [EuroPython 2018 - Talk - 2018-07-26 - Lammermuir] [Edinburgh, UK] By Martin Angelov I'm currently working in a Django project, We have a lot of tests (~ 2000) and a fair amount of code coverage currently. The system and the requirements of the client grows everyday (like in every other project these days). I've convinced that the effort we put in making each of these tests pays off daily. Speaking with other Django and Python developers I've noticed that people often "overengineer" their unit tests and they usually tend to break their principles. In this presentation I will talk mainly about unit tests. - what packages we use and how and when to use them (properly). We will take a look on how we structure our projects and how this structure actually helps us write proper unit tests. I will start with the very basic tests and continue with the mocking technique. In the end I'm going to refer to other testing methods (integration, E2E, validation testing, visual regression, etc.). The goal of this talk is to make people better in testing and to show them how these skills will fasten the development process and help them maintain their project and it's quality. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Lynn Root - asyncio in Practice: We Did It Wrong
asyncio in Practice: We Did It Wrong [EuroPython 2018 - Talk - 2018-07-26 - Lammermuir] [Edinburgh, UK] By Lynn Root This talk is aimed at those that have at least intermediate experience in Python and have played around with asynchronous Python using asyncio or other libraries. I want the audience to learn from my mistakes! For instance, how easy it is to get into “callback hell” (and how to avoid/get out of it), how to screw up thread safety and deadlock yourself, and making code async but not actually concurrent. I'll talk through some anti-patterns and best practices that I learned the hard way. This includes proper concurrency, calling coroutines from synchronous code, working with threads and threadsafety, properly shutting down an async programs, and hidden "gotchas". License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Anton Caceres - Python and Web Sockets
Python and Web Sockets [EuroPython 2018 - Talk - 2018-07-26 - Lammermuir] [Edinburgh, UK] By Anton Caceres Modern web-apps require bi-directional communication, reacting not only to user actions but also to server events. This can be achieved elegantly using Web Sockets, a protocol standardized by W3C to be a default tool for full-duplex connections on the Web. Although most web-frameworks do not support Web Socket integration out of the box, Python has multiple options available making it a piece of cake. This talk showcases integrating Web Sockets in Python web-apps, focusing on situations that can make good use of it and presenting implementations with most popular frameworks: Tornado and Django. We will explore a similar style but different underlying technologies of both, and finish with a live demo. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Aaron Bassett - Hello to the World in 8 Web Frameworks micro, batteries included & async
Hello to the World in 8 Web Frameworks (micro, batteries included & async) [EuroPython 2018 - Talk - 2018-07-26 - Lammermuir] [Edinburgh, UK] By Aaron Bassett Join us for a Phileas Fogg inspired whirlwind tour of eight Python web frameworks. "Had he programmed? It was likely, for no one seemed to know web frameworks more familiarly; there was no framework so obscure that he did not appear to have an intimate acquaintance with it. He must have developed in everything, at least in the spirit." We'll start with the current crop of microframeworks, showing how to achieve the same task in each, before progressing to "Batteries included" and the more specialised async frameworks. For developers who perhaps have only used a single framework, this talk gives them an opportunity to get out and explore the world (of web frameworks) and broaden their horizons, with plenty of Jules Verne inspired fun along the way. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Žan Anderle - JavaScript for Python Developers
JavaScript for Python Developers [EuroPython 2018 - Talk - 2018-07-26 - Kilsyth] [Edinburgh, UK] By Žan Anderle Having a hard time keeping track of where the modern JavaScript is going? Are you familiar only with jQuery and you want to know more? Or maybe you’re not familiar with JavaScript at all and want to learn it but you don’t know where to start? Then this talk is for you! You’ll learn about modern JavaScript from a perspective of a Python developer. By the end of the talk you’ll know everything you need to know about the language, its ecosystem, and different tools and frameworks. You’ll be able to start using JavaScript more confidently and be familiar with different tools that are at your disposal. We’ll go over all the things I wish I'd known when I first got started with JavaScript.: Basics of the language (types, operators, data structures, functions, modules, etc.) and how they are similar to or different from Python. Overview of the commonly used development and build tools. Overview of the popular frontend frameworks. A look into the newest features and Typescript. How to get started and make sense of everything with so much going on. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Windel Bouwman - A Python implementation in Rust?
A Python implementation in Rust? [EuroPython 2018 - Talk - 2018-07-26 - Kilsyth] [Edinburgh, UK] By Windel Bouwman Rust is a fairly new programming language aimed as a competitor of C. There are already attempts to write extension modules in rust and load them into CPython. A whole new approach would be to re-implement the Python language in rust. This is what the rspython project is about: implementing a python interpreter in rust. Rust already has many features such as vectors, hashmaps and strings as unicode. There also exist already modules for regular expressions and dealing with files, so a lot can be re-used in this area. During this talk we will dive into rust and python and the design of the rspython. We will present some challenges and opportunities. Also we will show the current state of this project in a demo. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Stephan Jaensch - Type annotations with larger codebases
Type annotations with larger codebases [EuroPython 2018 - Talk - 2018-07-26 - Kilsyth] [Edinburgh, UK] By Stephan Jaensch You've heard about type annotations, you know they help reduce bugs and improve documentation especially for large codebases, and you've attended an introductory talk or read a tutorial about using them. But how do you get started using them with your big, existing codebase? How do you make sure your colleagues will be annotating new code they write - or existing code they're changing? And how do you get around some of the issues you might run into when using the still-beta type checker mypy on your codebase? This talk will start where the typical introductory Python type annotation talks end and discuss the real-world challenges when starting to annotate types with an existing codebase of tens or hundreds of thousands of lines of code. I'll walk you through best practices learned from doing just that at Yelp, telling you about some of the roadblocks we hit (and how we got past them). We'll also take a look at: - how you can get the most out of type annotations even with non-annotated third-party libraries - how to deal with code patterns that currently don't always work well with annotations - when the only way to get proper type checking is through refactoring your code. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Mark Shannon - Is your code tainted? Finding security vulnerabilities using taint tracking
Is your code tainted? Finding security vulnerabilities using taint-tracking. [EuroPython 2018 - Talk - 2018-07-26 - Kilsyth] [Edinburgh, UK] By Mark Shannon "Taint tracking" is a technique used in code analysis to find security vulnerabilities and other problems. Any data that comes from an untrusted source, for example a HTTP request, is treated as "tainted". If that "tainted" data is able to reach a vulnerable part of your code, then you have a problem. Sophisticated code analysis tools can track this data, and reveal potential security problems. Examples of the sort of problem that can be found include cross-site scripting (XSS), code injection, SQL injection and others. In this talk I will show how taint tracking analysis works in practice, introducing the concepts of source, sink and sanitizer. I will then demonstrate using taint tracking to find a XSS vulnerability in a django app. (We will chose a project that is designed to teach django security, where the vulnerability is deliberate.) I will also explain how thinking in terms of "taint" can help you write safer code, even without access to code analysis. During this talk I will use the code analysis tools on lgtm.com to demonstrate the analysis. lgtm.com is free to use for open-source projects. A paid version is available. License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch
Mario Corchero - Mocks, dummies, stubs & spies
Mocks, fakes, dummies, stubs and spies: Successfully isolating the snake [EuroPython 2018 - Talk - 2018-07-26 - Kilsyth] [Edinburgh, UK] By Mario Corchero Ever wonder what mocks, fakes, dummies stubs or spies are? Or what the differences are between them and when one should be used instead of another? We will take a deep look into these concepts, what they mean and examples on how to use/create them in Python. In this talk, we will quickly explore the reasons for using mock and how it works, quickly jumping into the different concepts of testing doubles and how they can be used in Python. The talk will include as part of the examples from some features in mock coming in Python 3.7 that might change how usual mocking is performed. The talk builds on the writings of Gerard Meszaros and Martin Fowler about testing doubles, focusing on how to apply them to Python. This session, which will review test isolation concepts and the unittest.mock module, is structured in a way that both beginners and intermediate developers will learn from it. A basic knowledge of testing is recommended. Intermediate developers will leave the room with a clear understanding of the tools - further than just using simple mocks - to successfully fake dependencies. Multiple “not so well known” features of unittest.mock will be presented so we can shape those objects to behave functionally different. Unittest.mock is an extremely useful library which is commonly underused, this talk aims to bring clarity into stubbing in general and into medium/advanced mock features to ease and remove pain when users work with it. Outline: • Intro (1’) • Why doubles are important (1’) • Main qualities of a double (2’) • Overview of unittest.mock (5') • Testing doubles (15’) o Doubles (1’) o Stubs (2’) o Spies (3’) o Mocks (5’) o Fakes (2’) • Wrap up, conclusion and pointers (2') • Q&A (Expected 5’) License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/ Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/
Watch