Bob Belderbos
banner
bbelderbos.bsky.social
Bob Belderbos
@bbelderbos.bsky.social
👋 Co-Founder of Pybites
🐍 Python software developer + coach
📘 Love books/ reading
I solved a Bite today and used collections.Counter() 🙂

Good reminder: the right data structure saves a lot of code. 🐍

In this case: apart from a small helper function, you get the top stock by symbol using most_common()

Clean, fast, readable. 🚀
November 13, 2025 at 5:29 PM
Reposted by Bob Belderbos
One of our PDI clients is building a time tracker app with SQLModel + Flask.

It started simple, then grew as he hit real-world edge cases. That’s where the real dev learning happens:

⏱️ Format times
⛔ Avoid duplicates
🛠️ Handle errors clearly

What are you building this week?
November 13, 2025 at 2:18 PM
I like #Python books and reading source code for inspiration, but don't underestimate the power of the docs.

This week I learned that uuid now supports v7 and that random + sqlite3 added command-line scripts in recent versions.
November 12, 2025 at 10:39 AM
TIL #Python 3.14 comes with uuid6 and -7

And really nice: since 3.12 the uuid module can be executed as a script from the command line 📈 - so with a bit of uv we get to a pretty powerful command 😍 👇
November 11, 2025 at 11:55 AM
New Bite on the platform:

Subclassing: Vehicles in Motion

#python
August 11, 2025 at 10:40 AM
I really like the retry use case to demonstrate #python decorators:
July 29, 2025 at 8:32 AM
What are you doing with #python this week?
July 23, 2025 at 2:02 PM
Haven't been here in a while? What's happening?
July 23, 2025 at 12:44 PM
Heads up I am running another Snipster #Python training cohort next week - we'll build this cool app:
June 17, 2025 at 12:32 PM
Thanks for joining us 🎧 @tiangolo.com 🎉 and for all you do with @fastapi.tiangolo.com, other libs, and now FastAPI Cloud 😍

It will be so nice to deploy FastAPI apps with just: `fastapi deploy` 🚀

www.youtube.com/watch?v=Q_8a...
Pybites Podcast 191: Code, click, cloud - how Sebastián Ramírez is taking FastAPI to the next level
YouTube video by Pybites
www.youtube.com
May 27, 2025 at 5:13 PM
snakeviz == nice for profiling + visualizing 💡 💪 🐍

uv run python -m cProfile -o profile.out -m script_or_package
uv add --dev snakeviz
uv run snakeviz profile.out

(Screenshot: me profiling slow Pandas code as a candidate to refactor using Polars 🔥)

#python #debugging
May 9, 2025 at 3:51 PM
🚀 Built a #Streamlit front-end on top of a #FastAPI backend for our next cohort (starting next week!) 🚀

Great stack for quickly prototyping a front-end, all #Python, no JS 😎

(For more serious web apps you definitely want JS and/or htmlx though 💡)
May 6, 2025 at 4:43 PM
7 adjacent skills that made me a better #developer (early on):

💻 Vim + CLI
🛠 Support/troubleshooting
🚢 Building complete apps
✍️ Writing/blogging
✅ Automating tasks
🔁 Git
🤝 Mentoring/teaching

Code is just the start. These built the real foundation.

#developers #python
May 2, 2025 at 10:03 AM
#vibecoding, is it doing more harm than good?
April 29, 2025 at 1:40 PM
TIL about the 🔥 chardet library — it guesses unknown file encodings!

📄 Write text in latin-1 ➡️ try to read as utf-8 ➡️ 💥 UnicodeDecodeError.

👨‍💻 Solution:
April 29, 2025 at 10:09 AM
🚀 Build real software, not just more tutorials.

Join our 6-week Pybites Developer Cohort (PDC Professional) and ship a real app:

✅ Clean arch + TDD
✅ CLI + FastAPI
✅ CI/CD + Cloud deploy
✅ Portfolio-ready repo

Start May 12 → pybitescoaching.com
Pybites Developer Cohort (PDC) Coaching
pybitescoaching.com
April 29, 2025 at 7:46 AM
𝟱 𝗰𝗼𝗼𝗹 𝘄𝗮𝘆𝘀 to use the underscore in #Python 🐍💡

• Ignore 𝘃𝗮𝗹𝘂𝗲𝘀 when unpacking

• Loop 𝗽𝗹𝗮𝗰𝗲𝗵𝗼𝗹𝗱𝗲𝗿

• Access 𝗹𝗮𝘀𝘁 𝗿𝗲𝘀𝘂𝗹𝘁 in REPL

• Format 𝗹𝗮𝗿𝗴𝗲 𝗻𝘂𝗺𝗯𝗲𝗿𝘀

• Define "𝗽𝗿𝗶𝘃𝗮𝘁𝗲" methods (convention)

See below 👇
April 25, 2025 at 2:05 PM
Potentially underused #Python 🐍 feature: 𝘀𝗲𝘁 𝗼𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀 💡

Here's an example how we can remove or update tags, casting new + old into sets, then performing 𝘴𝘦𝘵 𝘰𝘱𝘦𝘳𝘢𝘵𝘪𝘰𝘯𝘴 🔥

Have you used them, how? 😍

(Still on the fence about 𝘸𝘢𝘭𝘳𝘶𝘴, but couldn't bear doing 𝘴𝘵𝘳𝘪𝘱() twice 😅)
April 25, 2025 at 6:16 AM
Seems pydantic validators don't hit with sqlmodel table=True - have you hit this and if so, how have you added validation to your model (e.g. min length field = N characters)?
April 24, 2025 at 8:15 AM
Making a temporary file/dur is very useful for 𝘁𝗲𝘀𝘁𝗶𝗻𝗴.

In the example below, we first use 𝘛𝘦𝘮𝘱𝘰𝘳𝘢𝘳𝘺𝘋𝘪𝘳𝘦𝘤𝘵𝘰𝘳𝘺 to create 5 temp files.

This is a great example of using a 𝗰𝗼𝗻𝘁𝗲𝘅𝘁 𝗺𝗮𝗻𝗮𝗴𝗲𝗿 — a clean way to automatically clean up resources.

pytest makes it even easier using the 𝘵𝘮𝘱_𝘱𝘢𝘵𝘩 fixture:
April 23, 2025 at 9:14 AM
Do you know all these 5 powerful uses of * in #Python?

– Keyword-only args
– Extended unpacking
– Flexible funcs with *args
– Unpack into func calls
– Merge iterables

👇 See examples below — which ones do you use the most, and which ones are new to you?

#coding #tips
April 18, 2025 at 8:37 AM
'Scratch your own itch' is a good driver to build stuff. 💪

And even trivial things can lead to interesting projects. 💡

See this emoji searcher project for example, I still use this every day to find + copy emojis 🚀
github.com/bbelderbos/e...

What are you building with #Python?
GitHub - bbelderbos/emojisearcher: No more google search, copy emojis to the clipboard.
No more google search, copy emojis to the clipboard. - bbelderbos/emojisearcher
github.com
April 18, 2025 at 8:19 AM
Becoming a proficient #Python dev isn’t just about syntax, it’s about building usable apps with clean, testable, well-structured code.

That’s what we coach in our 6-week cohort starting next month.

Real apps. Real feedback. Real growth. 💪

More info: pybitescoaching.com
April 17, 2025 at 3:20 PM