Python Bytes cover image

Python Bytes

Latest episodes

undefined
33 snips
Apr 7, 2025 • 37min

#427 Rise of the Python Lord

Explore the power of Git Town, a tool that enhances Git workflows and helps streamline code contributions. Discover PEP 751, a groundbreaking file format for managing Python dependencies with improved reproducibility. Delve into automated tools that boost team collaboration and package management. Learn about version control techniques, including the 'blame' feature and squashing commits for cleaner project history. Finally, uncover how UV and PEP 723 simplify deploying Python scripts, plus amusing anecdotes from the Python community.
undefined
35 snips
Mar 31, 2025 • 29min

#426 Committing to Formatted Markdown

Discover the magic of mdformat, an opinionated Markdown auto-formatter that enforces stylish consistency. Learn how to master Markdown lists and enhance your coding efficiency with tools like PipX and pre-commit hooks. Explore the latest Python Enhancement Proposals, including PEP 578 and 781, and dive into the realm of privacy-centered search engines. Enjoy a lighthearted discussion on Python dependency management, sprinkled with humorous anecdotes that make coding quirks relatable!
undefined
5 snips
Mar 24, 2025 • 38min

#425 If You Were a Klingon Programmer

Dive into the evolving landscape of Python tooling as the discussion reveals the advantages of using uv over traditional methods. Unpack the complexities of Python package management and the newly launched Python Developer Tooling Handbook. Discover the latest in linting tools and the innovative Blacken Docs for documentation enhancement. The conversation also explores reinventing notebooks for better functionality in Python programming. Plus, indulge in some humorous takes on Klingon programmers that will keep you chuckling!
undefined
17 snips
Mar 17, 2025 • 27min

#424 We Will Test in Production

Discover the peculiarities of Python's rounding mechanism, where numbers ending in .5 round to the nearest even integer. Dive into performance enhancements thanks to tail call optimization, promising up to 10% speed improvements in upcoming releases. Learn practical techniques for string manipulation to easily remove punctuation. Plus, enjoy a humorous take on the risks of testing in production, underscored by a clever Star Trek analogy. All this, sprinkled with insights on Python infrastructure and startup opportunities!
undefined
Mar 10, 2025 • 27min

#423 Traveling the Python Universe

Topics covered in this episode: pysqlscribe A map of Python Rust, C++, and Python trends in jobs on Hacker News (February 2025) The features of Python's help() function Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky) Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky) Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Michael #1: pysqlscribe A Python library intended to make building SQL queries in your code a bit easier. A Query object can be constructed using the QueryRegistry's get_builder featuring a dialect (e.g; "mysql", "postgres", "oracle"). Brian #2: A map of Python Cool visualization of dependencies in PyPI packages Even cooler visualization (linked from main article) Michael #3: Rust, C++, and Python trends in jobs on Hacker News (February 2025) Interesting supply and demand comparisons from at least on source. Brian #4: The features of Python's help() function Trey Hunner Don’t forget how useful and cool help() is. Extras Michael: Granian works with FastAPI again Joke: Computer engineer vs. Geologist
undefined
Mar 3, 2025 • 33min

#422 You need 4 spaces

Get ready for a deep dive into a future where Python thrives in the browser! Discover how a new project layout using `pyproject.toml` is set to revolutionize production apps. The hosts break down aiolimiter, an exciting tool for controlling rate in asyncio tasks. Plus, there's a light-hearted look at coding humor, including the classic tabs versus spaces debate. Tune in for innovative web development tips and a peek into fresh ideas like Reloadium, enhancing your coding journey!
undefined
Feb 24, 2025 • 23min

#421 22 years old

Discover a handy tool for debugging HTTP requests in Python, making troubleshooting a breeze. Exciting news as the Python Packaging Index now supports wheels for both iOS and Android, paving the way for mobile development. Dive into the latest features in the arcade game platform with its new 3.0 update. Learn about PEP 765 and its impact on coding practices. Enjoy a lighthearted joke about teapots while exploring tech upgrades like a surprisingly affordable Mac Mini. Tune in for a fun discussion on programming preferences and challenging logical puzzles!
undefined
Feb 17, 2025 • 28min

#420 90% Done in 50% of the Available Time

Topics covered in this episode: PEP 772 – Packaging governance process Official Django MongoDB Backend Now Available in Public Preview Developer Philosophy Python 3.13.2 released Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky) Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky) Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Brian #1: PEP 772 – Packaging governance process draft, created 21-Jan, by Barry Warsaw, Deb Nicholson, Pradyun Gedam “As Python packaging has matured, several interrelated problems with the current way of managing the technical development, decision making and processes have become apparent.” “This PEP proposes a Python Packaging Council with broad authority over packaging standards, tools, and implementations. Like the Python Steering Council, the Packaging Council seeks to exercise this authority as rarely as possible; instead, they use this power to establish standard processes.” PEP discusses PyPA, Packaging-WG, Interoperability Standards, Python Steering Council, and Expectations of an elected Packaging Council A specification with Composition: 5 people Mandate, Responsibilities, Delegations, Process, Terms, etc. Michael #2: Official Django MongoDB Backend Now Available in Public Preview Over the last few years, Django developers have increasingly used MongoDB, presenting an opportunity for an official MongoDB-built Python package to make integrating both technologies as painless as possible. Features The ability to use Django models with confidence. Developers can use Django models to represent MongoDB documents, with support for Django forms, validations, and authentication. Django admin support. The package allows users to fire up the Django admin page as they normally would, with full support for migrations and database schema history. Native connecting from settings.py. Just as with any other database provider, developers can customize the database engine in settings.py to get MongoDB up and running. MongoDB-specific querying optimizations. Field lookups have been replaced with aggregation calls (aggregation stages and aggregate operators), JOIN operations are represented through $lookup, and it’s possible to build indexes right from Python. Limited advanced functionality. While still in development, the package already has support for time series, projections, and XOR operations. Aggregation pipeline support. Raw querying allows aggregation pipeline operators. Since aggregation is a superset of what traditional MongoDB Query API methods provide, it gives developers more functionality. Brian #3: Developer Philosophy by qntm Intended as “advice for junior developers about personal dev philosophy”, I think these are just great tips to keep in mind. The items Avoid, at all costs, arriving at a scenario where the ground-up rewrite starts to look attractive This is less about “don’t do rewrites”, but about noticing the warning signs ahead of time. Aim to be 90% done in 50% of the available time Great quote: “The first 90% of the job takes 90% of the time. The last 10% of the job takes the other 90% of the time.” Automate good practices Think about pathological data “Nobody cares about the golden path. Edge cases are our entire job.” Brian’s note: But also think about the happy path. Documenting and testing what you think of as the happy path is a testing start and helps others understand your idea of how things are supposed to work. There’s usually a simpler way to write it Write code to be testable It is insufficient for code to be provably correct; it should be obviously, visibly, trivially correct Brian’s note: Even if it’s obviously, visibly, trivially correct, it will still break. So test it anyway. Michael #4: Python 3.13.2 released Python 3.13’s second maintenance release. About 250 changes went into this update Also Python 3.12.9, Python 3.12’s ninth maintenance release already. Just 180 changes for 3.12, but it’s still worth upgrading. For us, it’s simply rebuilding our Docker base (i.e. —no-cache) with these lines: RUN curl -LsSf https://astral.sh/uv/install.sh | sh RUN --mount=type=cache,target=/root/.cache uv venv --python 3.13 /venv Extras Brian: Still thinking about pytest plugins a lot. The top pytest plugin list Has been updated for Feb Is starting to include things without “pytest” in the name, like Hypothesis and Syrupy. Eventually I’ll have to add “looking at trove classifiers” as part of the search, but for now, let me know if you’re favorite is missing. Includes T&C podcast episode links if I’ve covered it on the show. There’s 2 so far Michael: There's a new release of PyScript out. All the details are here: Highlight is new PyGame-CE support. Go play! PEP 2026 – Calendar versioning for Python rejected. :( PEP 759 – External Wheel Hosting withdrawn Joke: Pride Versioning
undefined
Feb 4, 2025 • 30min

#419 Is your back end popular?

Topics covered in this episode: content-types package for better MIME types/Content-Type Wagtail 6.4 Build It Yourself Build backend popularity over time Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky) Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky) Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Michael #1: content-types package for better MIME types/Content-Type It started with this comment from Raf. mimetypes — Map filenames to MIME types It is oddly missing very common types and varies by platform, OS install and other factors (see this function). Search around and found python-magic. Seems great but ImportError: failed to find libmagic. Check your installation → brew install libmagic magic.from_file("testdata/test.pdf") → FileNotFoundError: [Errno 2] No such file or directory: 'testdata/test.pdf' hmm So I had to create my own. Introducing content-types A Python library to map file extensions to MIME types. Unlike other libraries, this one does not try to access the file or parse the bytes of the file or stream. It just looks at the extension. Better support than mimetypes builtin. Brian #2: Wagtail 6.4 Release notes Lots of great updates, but I want to zoom in on background tasks. 6.4 includes django-tasks which is an available implementation of DEP 0014: Background workers This proposal is accepted and this thread includes a great talk from DjangoCon Europe 2024 Why is this cool? Even though django-tasks says it’s “under active development”, as long as you pin the version and test your behavior depending on this, it must be ready to use if wagtail is going for it. Don't you think? Michael #3: Build It Yourself from Armin Ronacher, sent in by Rafael Weingartner An excellent article pushing back on too many dependencies Maybe the advice of always prefer code reuse isn’t that great after all? It’s much much easier to solve small little problems these days due to AI. Take Postmark as an example. “It's time to have a new perspective: we should give kudos to engineers who write a small function themselves instead of hooking in a transitive web of crates. We should be suspicious of big crate graphs. Celebrated are the minimal dependencies, the humble function that just quietly does the job, the code that doesn't need to be touched for years because it was done right once.” - Armin Brian #4: Build backend popularity over time Bastian Venthur This is just for projects using pyproject.toml Apparently he did this last year as well, so we can see some trends. Results setuptools: ~50% (last year ~50%) poetry: ~30% (last year ~33%) hatchling: (percent not listed, but looks like 12-15%), (last year 10%) flit: ~5% (last year ~10%) other: (above flit now) Analysis: setuptools continues to grow in absolute numbers and maintain it’s percentage. poetry declining hatchling growing flit declining Brian commentary This is not surprising to me. I generally use hatchling for more control, and setuptools for simple projects. I think we might end up with mostly setuptools and hatchling in a couple years. Extras Brian: Test & Code Archive is now all episodes on one page Old method was 30 episodes per page For something completely different NameGrapher - popularity of US names No wonder I don’t meet a lot of kids named Brian Michael is #16 (#1 in 1950s - 1990s) Brian is #317 (#8 in 1970s) Joke: The long path to rejection.
undefined
7 snips
Jan 27, 2025 • 20min

#418 I'm a tea pot

The show opens with a heartfelt tribute to Michael Foord, a key figure in the Python community. Listeners will discover Valkey, a powerful open-source alternative to Redis. The hosts dive into 30 software development best practices, highlighting simplicity and proper code maintenance. They also discuss cautious mocking in testing and managing MIME types for web projects. Lastly, they celebrate Python's milestones while playfully discussing the quirky HTTP status code 418.

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner