How to better streamline your Python project using a Makefile

Makefiles are awesome, and you can use them in your Python projects too (they are not only to compile and build C/C++ projects that is) 😎 They help you automate various tasks and streamline the development process overall 🚀 They allow you to: – Manage dependencies– Run tests– Build documentation– Format your code– Lint and… Continue reading How to better streamline your Python project using a Makefile

All You Need to Know to Start Using Fixtures in Your pytest Code

Setting up test cases for code that manage data can be challenging but it’s an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest’s killer feature so let’s explore them in this article using a practical example.

Best Practices for Compatible Python 2 and 3 Code

95% of most popular Python packages support Python 3. Maybe you are lucky and get to start fresh using Python 3. However as of last year Python 2.7 still reigns supreme in pip installs and at a lot of places 2.x is the only version you get to work in. I think writing Python 2 and 3 compatible code is an important skill, so lets check what it entails.