Share

Teaching Python through building cool apps 🐍 📈

Building a Time Tracker App with SQLModel + Flask ⏱️

Hey Pythonista,


Sharing some inspiration to start the week!


One of our PDI clients is building a time tracker app using SQLModel, Flask, and some hand rolled CSS. He's just posted in the community sharing some cool progress and lessons learned.

When you start a project, you never think of everything. But as you code, the app starts to take shape, and that’s where the fun is! 💡

Key takeaways for him:

  • Formatting and validating times correctly is trickier than expected.

  • You need checks to prevent duplicate or misspelled entries.

  • Handling exceptions gracefully helps users understand what went wrong.

The app’s next step: a home page showing all employees and their monthly hours, plus a cleaner navbar menu for adding, editing, and deleting records.


👉 What are you building this week? Let us know!


Celebrate this and/or share your win

Better uuid's since 🐍 3.14


Did you know Python 3.14 comes with uuid6 and -7?

From the uuid7 website:

UUIDv7 is one of the UUID versions that is time-based, much like UUIDv1. However, it offers a precise timestamp, up to 50 nanosecond resolution. The core feature that sets UUIDv7 apart is its time-sortable property. This means that newer UUIDs generated will be greater in value than older ones, and thus, they can be naturally sorted based on creation time. This is especially useful for database indexes.

And since 3.12 the uuid module can be executed as a script from the command line 📈 - together with a bit of uv 😍 we get to a pretty powerful command -> see the code image to the right.


Follow Bob for more Python tips

The science of open science

What if the most valuable part of your research isn’t the paper, but the package that made it possible?


On this latest episode of the podcast, Leah Wasser, Executive Director & Founder of pyOpenSci speaks with Julian about what "Open Science" really means.


This is a brilliant conversation about the role of OSS in Science and the part Leah is playing to increase visibility of Scientific Python Package creators.


So much more in the episode than can be written here so go listen on your favourite podcast platform! Or...


Watch it on YouTube

Looking under the SQLModel covers 💪 💡


Building real software changes everything. You go into the guts of libraries and frameworks. This is exactly what happens in our Snipster program:


Question the other day:

Why Your SQLModel Object Still Has id=None After Commit 🧠


Ever created a record with SQLAlchemy or SQLModel, called session.commit(), and noticed your object’s id is still None?

That’s because the database assigns the ID — but your Python object in memory doesn’t automatically know it yet.

💡 Solution: “Hydrate” it with session.refresh()


session.add(snippet)
session.commit()
session.refresh(snippet)


Now your object is fully hydrated — it knows its database-assigned values (like id).

Think of it as giving your Python object a quick drink of data 🥤 so it knows who it really is.


--

Tutorials are a good starter, but real understanding comes from using tools and libraries to build something bigger and real-world. With our guidance you won't get lost and will learn the best practices faster.


Join our Snipster program

If you don't try, you don't get

A brief conversation yesterday reminded me that you have a 0% chance of success when you choose not to try in the first place. 


Another way to put it: if you give up, you are guaranteed to fail.


Every time you choose to get up, do the work, make the phone call, apply for the job, respond to the email, write the code, you are choosing success over failure.


Things are tough these days, so give yourself every chance of success by choosing to get up and try every day.


- Julian

\n\n\n\n

Email Marketing by ActiveCampaign