List of videos

Stefan Behnel - Cython to speed up your Python code
Cython to speed up your Python code [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Stefan Behnel Cython is not only a very fast and comfortable way to talk to native code and libraries, it is also a widely used tool for speeding up Python code. The Cython compiler translates Python code to C or C++ code, and applies many static optimisations that make Python code run visibly faster than in the interpreter. But even better, it supports static type annotations that allow direct use of C/C++ data types and functions, which the compiler uses to convert and optimise the code into fast, native C. The tight integration of all three languages, Python, C and C++, makes it possible to freely mix Python features like generators and comprehensions with C/C++ features like native data types, pointer arithmetic or manually tuned memory management in the same code. This talk by a core developer introduces the Cython compiler by interactive code examples, and shows how you can use it to speed up your Python code. You will learn how you can profile a Python module and use Cython to compile and optimise it into a fast binary extension module. All of that, without losing the ability to run it through common development tools like static analysers or coverage test tools. 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
Radoslav Georgiev - Django structure for scale and longevity
Django structure for scale and longevity [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Radoslav Georgiev Django structure for scale and longevity Why Django is great. But as we add new features, as our dev team grows & the software needs to be stable on production, things can get quite messy. We are going to look at some common patterns, derived from experience, on how to structure your Django project for scale and longevity. What Main topics are: Django service layer or where should business logic live? Using Django Rest Framework in a clean & repeatable way & combining it with the service layer. Testing everything that matters, without repeating ourselves in different tests. We are going to talk about when to rely on existing abstraction so it's actually helpful & when to avoid existing abstraction, and code things ourselves. The examples showed in this talk are derived from working with Django in the last 5 years on projects with: Daily production usage & production deploys. Dozens of apps. Hundreds of models & APIs. Tens of integrations working simultaneously. Teams of 5 to 10 people. Who Key takeaways from the talk: Increased productivity when developing with Django. Deeper understanding of the software development process with Django. Demo project with everything mentioned in it. The talk is great for all levels of Django knowledge - from beginners to advanced users & teams. How The main way of getting the point across is going to be by showing regular code, talking how it can get messy & then following up with examples of improving that code. Hopefully this talk will start a lot of discussion afterwards. Breakdown of the talk: Django service layer Fat models or fat views? Where do I put my business logic? What is a service & what goes into a service? What is a selector & what goes into a selector? General Django structure How many apps should I have? Structuring your code so youр team can be more productive and have less conflicts. Common modules & utilities. Doing APIs with Django Rest Framework Splitting APIs in 2 groups - "giving data" and "taking data" Using a lot of generics for "give data" When do to selectors? Using no generics for "take data" (APIView + Services) Handling errors from services Inlining serializers & avoiding serializers reuse A neat inline_serializer util Introducing general error formatting for your API Testing all of that - what should be & not be tested? 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
Naomi Ceder - Iteration Inside Out Python's Iteration Protocol
Iteration Inside Out - Python's Iteration Protocol [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Naomi Ceder Using for loops and list comprehensions in Python is basic and quite common, right? But how does iteration in Python actually work "under the hood"? The words "iterator" and "iterable" each occur over 500 times in the Python documentation, but what does an iterator actually do, as opposed to an iterable? And how do they do it? Learn the details as we turn the iteration protocol inside out, with live coded demonstrations along the way. This talk will start from the way Python iterates of over a sequence, in comparison with iterating by index, like C. The key point of iterating over a sequence is that something needs to track which item in the sequence is next, which is something that Python's iteration protocol manages. The iterable section will demonstrate creating a simple object that returns items by index (e.g., a fibonacci series), showing that getitem is really all you need for an iterable, since an iterator is created for such objects when iterated upon. BUT, this doesn't answer the question of how Python keeps track of which item is next. The iterator section answers that question by converting the iterable just created to an iterator - adding iter and next methods and showing how the iterator saves state and essentially drives the iteration protocol. Having an accurate understanding of iteration protocol will help developing Pythonistas reason better about both iterating over existing objects and creating their own iterables and iterators. 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
Jukka Lehtosalo - Getting Started with Mypy and Type Checking
Getting Started with Mypy and Type Checking [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Jukka Lehtosalo Ever wondered if you should try type checking in your Python project, or what it takes to get started with mypy? I will show how to introduce type checking the easy way, one step at a time. Dropbox was an early adopter of type checking and mypy, and we've been gradually adding type annotations to our large production codebases since 2016. Engineers love how type annotations improve the clarity of code, and how mypy can surface hard-to-find bugs. We've learned a lot in the process of annotating millions of lines of code, and in this talk you'll learn battle-tested approaches for adding type checking to an existing codebase. I expect no previous experience with mypy. You'll benefit the most if you've worked on a project with multiple developers. 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
Jose Manuel Ortega - Microservices and Serverless in Python projects
Microservices and Serverless in Python projects [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Jose Manuel Ortega Monoliths, microservices and now Serverless. Function as a Service (FaaS) platforms give us new ways to attack old problems. The possibility of executing functions as a service allows designing scalable and highly parallel applications, but on the other hand, this kind of applications require a particular programming style. For example, bundling dependencies and managing state is not trivial. However, there are plenty of tools and frameworks to help you code serverless applications with Python, and once you get started it is not complicated. In this talk we will mention the advantages of Serverless and we will focus on the situations in which we can introduce it into our Python projects. We will use AWS Lambda for the examples. These could be the main talking points: Introducing Serverless and Function as a Service (FaaS) in Python projects Advantages of Microservices and Serverless AWS Lambda functions with chalice Testing AWS lambda with docker 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
Guillaume Gelin - PEP 557* versus the world
PEP 557* versus the world [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Guillaume Gelin Python 3.7 will ship with a new module called dataclasses, which has been defined in PEP 557. What is this module? What are the problems that PEP 557 authors try to solve? What was the chosen design, and why? How does it compare against the tools that already exist? This talk will deeply cover dataclasses, but also attrs box, thingy and others. 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
Francisco Javier Aceituno Lapido - Developing in a black hole: vim, tmux, httpie and jq
Developing in a black hole: vim, tmux, httpie and jq [EuroPython 2018 - Talk - 2018-07-26 - Moorfoot] [Edinburgh, UK] By Francisco Javier Aceituno Lapido "Productivity depends on the knowledge you have of the tools used." Do you feel that the development tools you use are heavy? Do you think that they make you less productive? Do you want to have maximum productivity without lifting your hands from the keyboard? If so, this talk is for you. In this talk, I will show what are the tools I use every day in software development at OnTruck and how you can integrate the text editor, vim the terminal multiplexer, tmux the HTTP client, httpie and the json processor, jq to get a very productive development environment, all running on a simple terminal. 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
Steve Barnes - Why develop a CLI Command Line Interface first?
Why develop a CLI (Command Line Interface) first? [EuroPython 2018 - Talk - 2018-07-26 - Lammermuir] [Edinburgh, UK] By Steve Barnes One of the core concepts of Application Development, (not just in python), is the separation between the Business Logic and the User Interface. However there is a strong temptation to start with the user interface and add the business logic to it some methodologies emphasize this with the process of prototyping the (G)UI first. The danger is that your business logic code can get too entangled with the UI and a change of platform or framework becomes almost impossible. This presentation will show how to maintain a clear separation between the Business Logic and the User Interface by starting with a command line interface using argparse and growing a GUI on top. We will cover: - Why maintain the seperation - Using argparse - Adding a GUI layer with wxPython - Automating the GUI generation - Adding a web interface - Testing advantages of this approach - Scripting advantages - Some packaging models. Slides and Samples all uploaded to https://github.com/GadgetSteve/EP2018_Talk 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
Nina Zakharenko - Code Review Skills for Pythonistas
Code Review Skills for Pythonistas [EuroPython 2018 - Talk - 2018-07-26 - Lammermuir] [Edinburgh, UK] By Nina Zakharenko As teams and projects grow, code review becomes increasingly important to support the maintainability of complex codebases. In this talk, I'll cover guidelines for writing consistent python code beyond pep8, how to look out for common python gotchas, and what python tools are available to automate various parts of the review process. Most importantly, I'll cover the human aspect of code reviews - how we can be better at approaching reviews with empathy and understanding from the perspective of both a reviewer and a submitter. Following these successful code review practices will lead to happier teams and healthier code bases. This talk is useful for python developers with any amount of experience. No prerequisite knowledge is necessary. - For those who are just starting out, it will be a great general overview. - Intermediate developers may not know about the wide variety of tooling that's available. - Advanced developers will learn techniques for performing code reviews with empathy. This talk will enable you to have better code reviews on your teams at work, and a better approach to code reviews in open source projects. You'll leave with 3 main takeaways: 1. Code Reviews are most effective when conducted with empathy. If you do reviews with growth and learning in mind, they become tools for sharing knowledge instead of an opportunity to bruise egos or show off esoteric knowledge. 2. Python has powerful tooling available for code reviews such as pep8 as a style guide, pylint as a linter, coverage.py to identify test coverage, and vulture to identify dead code. 3. That python style guides beyond pep8 have clear benefits in terms of producing more consistent code that's easier to review and easier to maintain. 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