In this article I will share 3 libraries I often use to isolate my environment variables from production code. Why is this important? Separate config from code As we can read in The Twelve-Factor App / III. Config: Apps sometimes store config as constants in the code. This is a violation of twelve-factor, which requires strict… Continue reading How to handle environment variables in Python
Articles on tips
5 Helpful Python Decorator Use Cases
By Bob Belderbos on 3 August 2021
Some time ago I asked on Twitter: I was curious what you use #Python decorators for? And I got quite an amazing / insightful response: The obvious next step for me was to look at some examples / use cases. So below are 5 useful applications of decorators. Study them, then apply similar things to… Continue reading 5 Helpful Python Decorator Use Cases
10 Cool Pytest Tips You Might Not Know About
By Bob Belderbos on 26 February 2021
Here are 10 things we learned writing pytest code that might come in handy.
How to Deploy Your Open Source Package to PyPI
By Bob Belderbos on 31 August 2020
In this post I share some useful things I learned deploying an open source package to PyPI.
There’s no Wrong Way… to Eat a Bite of Py
By AJ Kerrigan on 27 November 2019
There are many ways to tackle a Bites of Py exercise, try them all!
Building a Python Tips API with Django REST Framework and Deploying it to Digital Ocean
By Bob Belderbos on 5 March 2019
In this article I will show you how to build a simple API for our growing collection of Python tips. First we make a simple Django app, defining the model. Next we use Django REST Framework to make an API supporting common CRUD operations. Then we will test it out using curl, Postman and Django REST’s browser front-end. Lastly we deploy the API to Digital Ocean so we can start using it via our Slack with a Slash Command, which I will cover in the next article. Sounds exciting? You bet it is! Let’s jump straight in!
Generating Beautiful Code Snippets with Carbon and Selenium
By Bob Belderbos on 26 February 2019
Did you notice our Python tips lately? They looks more sexy, don’t they? That’s thanks to Carbon which lets you create beautiful images of your source code. As much as I love its interface though, what if we can automate this process generating the image for us? That’s what we did and posting new tips to Twitter is now a breeze. In this article I will show you how using a bit of BeautifulSoup and selenium. Enjoy!
PyBites Twitter Digest – Issue 01, 2019
By PyBites Team on 17 February 2019
It has been too long but we’re excited to bring you today: PyBites Twitter Digest – Issue 01, 2019
PyBites Twitter Digest – Issue 38, 2018
By PyBites Team on 9 December 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.
Persistent Virtualenv Environment Variables with python-dotenv
By Julian Sequeira on 6 October 2018
In this article I’m going to show you how to declare persistent environment variables in Python Virtual Environments with python-dotenv.