“KeyError: ‘GOOGLE_APPLICATION_CREDENTIALS‘” It was way too early in the morning for this error. See if you can spot the problem. I hadn’t had my coffee before trying to debug the code I’d written the night before, so it will probably take you less time than it did me. app.py: file_handling.py: See the problem? This was… Continue reading Adventures in Import-land, Part II
Articles on APIs
Avoiding Silent Failures in Python: Best Practices for Error Handling
By Bob Belderbos on 7 August 2023
In the world of programming, errors are inevitable. But how we choose to handle these errors can make the difference between a system that is robust and user-friendly and one that is fraught with ambiguous issues 😱 The Zen of Python famously states, “Errors should never pass silently.” This principle emphasizes the importance of addressing… Continue reading Avoiding Silent Failures in Python: Best Practices for Error Handling
Building a 500 line API regression test suite
By Bob Belderbos on 15 December 2022
This article appeared as a Pybites email first. If you like it consider joining our friends list for weekly Python, developer and (!) mindset content … Last year I built a cool API to post code images using our pybites-carbon tool. It will store the tip code in a database and store the code image in an… Continue reading Building a 500 line API regression test suite
Software Engineering and Entrepreneurship
By PyBites Team on 15 November 2022
Listen here: This week we talk with Yujian, software developer and entrepreneur. We dive into: – His background. – Why he uses Python and the switch from Java. – His core Python focus these days + cool side projects he’s maintaining. – How entrepreneurship is fundamentally different from software engineering. – His viral post on certificates vs the reality of looking things up… Continue reading Software Engineering and Entrepreneurship
Practical Django with Antonio Melé
By PyBites Team on 29 September 2022
Listen here: This week we have Antonio Melé on the show, CTO & co-founder at Nucoro and author of Django 4 by Example. We talk about: – His day to day at Nucoro. – Why he chose Django as a web framework and how he uses it at the company. – What inspired him to write a… Continue reading Practical Django with Antonio Melé
How to Debug a Hanging Test Using pytest
By Bob Belderbos on 18 March 2020
Today a wanted to share a neat trick that might save you some headache: debugging a hanging test.
The Pythonic Fast Lane, Digest of a 30 Min Mentoring Session
By Bob Belderbos on 12 February 2020
The other day I had an awesome mentoring session with a beginner Pythonista, amazing what 30 min of screen sharing can do. Read on to learn more …
How to Cleanup S3 Objects and Unittest it
By Giuseppe Cunsolo on 2 September 2019
In this guest post Giuseppe shares what he learned having to cleanup a large number of objects in an S3 bucket. He introduces us to some boto3 as well as moto and freezegun he used to test his code. Enter Giuseppe …
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!
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.