Powered by RND
Listen to Python Bytes in the App
Listen to Python Bytes in the App
(36,319)(250,152)
Save favorites
Alarm
Sleep timer
Save favorites
Alarm
Sleep timer

Python Bytes

Podcast Python Bytes
Podcast Python Bytes

Python Bytes

Michael Kennedy and Brian Okken
add
Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, d...
More
Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, d...
More

Available Episodes

5 of 10
  • #353 Hatching Another Episode
    Topics covered in this episode: OverflowAI Switching to Hatch Alpha release of the Ruff formatter What is wrong with TOML? Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Python Testing with pytest, full course Patreon Supporters Connect with the hosts Michael: @[email protected] Brian: @[email protected] Show: @[email protected] Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: OverflowAI Integration of generative AI into our public platform, Stack Overflow for Teams, and brand new product areas, like an IDE integration. Have a conversation about the search results and proposed answer with GenAI Coming with IDE integration too. Check out the video on their page for some more detail than the article. Brian #2: Switching to Hatch Oliver Andrich Hatch has some interesting features Template built from hatch new myproject includes isolating dev, test, lint virtual environments. Each env can have scripts Test matrix ala tox, but possibly easier to express complex matrices. May not even need tox then, but then now you have hatch. A way to specify which optional dependencies needed for default environment. Notes from Brian One premise is that lots of projects are now using hatch. I don’t know if that’s true. A quick spot check of a few projects include projects that use hatchling. While hatchling is the back end to hatch, they are not the same. I use hatchling a lot now, but haven’t picked up using hatch. But I do want to try it more after reading this article. Michael #3: Alpha release of the Ruff formatter vis Sky Kasko Charlie Marsh announced that an alpha version of a Ruff formatter has been released in Ruff v0.0.289. The formatter is designed to be a drop-in replacement for Black, but with an excessive focus on performance and direct integration with Ruff. Sky says: I can't find any benchmarks that have been released yet, but I did some extremely unscientific testing and found the Ruff formatter to be around 5 to 10 times faster than Black when running on already-formatted code or in a small codebase, and 75 times faster when running on a large codebase of unformatted code. (The second outcome probably isn't very important since most people would not often be formatting thousands of lines of completely unformatted code.) For more info, see the README: https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_formatter/README.md Brian #4: What is wrong with TOML? Colm O'Connor Suggested by Will McGugan This is a comparison of TOML vs StrictYAML under the use case of “readable story tests”. TLDR; For smallish things like pyproject.toml, toml is fine. For huge files, something like StrictYAML may be less horrible. from Brian: Short answer: Nothing, unless you’re doing crazy things with it. Re “readable story tests”: WTF? Neither of these are something I’d like to maintain. Extras Brian: Python Testing with pytest, the course New intro video to explain what the course is about Using Teachable video like notes, mini-viewer, and speed controls Chapter on “Testing Strategy” is next Michael: HTMX + Django: Modern Python Web Apps, Hold the JavaScript Course Coding in Rust? Here's a New IDE by JetBrains Delightful Machine Learning Apps with Gradio out on Talk Python Joke: The 5 stages of debugging
    9/19/2023
    29:27
  • #352 Helicopter Time Comes to Python
    Topics covered in this episode: Heliclockter - Like datetime, but more timezone-aware Wagtail 5 Git log customization MiniJinja template engine Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Python People Podcast Patreon Supporters Connect with the hosts Michael: @[email protected] Brian: @[email protected] Show: @[email protected] Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Brian #1: Heliclockter - Like datetime, but more timezone-aware Suggested by Peter Nilsson The library exposes 3 classes: datetime_tz, a datetime ensured to be timezone-aware. datetime_local, a datetime ensured to be timezone-aware in the local timezone. datetime_utc, a datetime ensured to be timezone-aware in the UTC+0 timezone. Michael #2: Wagtail 5 Wagtail is the leading open-source Python CMS, based on Django. Anything you can do in Python or Django, you can do in Wagtail. Wagtail 5.0 provides even more options for your content creation experience Dark mode has arrived SVG support Enhanced accessibility checker Delete more safely Some breaking changes in it because this release removes some of the old code paths that were maintained to give people more time to adapt their code to the new upgrades Add custom validation logic to your Wagtail projects. You can now attach errors to specific child blocks in StreamField. Brian #3: Git log customization Justin Joyce Just a simple git log --oneline makes the log so much more readable, but don’t stop there. --graph helps to show different branches -10 shows the last 10 commits. And this beauty in .gitconfig makes git lg mostly do what you want most of the time: [alias] lg = log --graph -10 --format='%C(yellow)%h%Creset %s %Cgreen(%cr) %C(bold blue)[HTML_REMOVED]%Creset' Michael #4: MiniJinja template engine MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2 Comes with integration back into Python via minijinja-py package. MiniJinja has a stronger sandbox than Jinja2 and might perform ever so slightly better in some situations. However you should be aware that due to the marshalling that needs to happen in either direction there is a certain amount of loss of information. Compiles to WebAssembly Extras Brian: The pytest Primary Power course is ready. To celebrate wrapping up the first course, pytest Primary Power is $49, the bundle is $99. Bundle: This + next 2 courses + access to repo, discussion forum, Slack, and Discord Michael: New HTMX, language course, and data science course coming at Talk Python. Add your name here to get notified. I’ll be at PyBay 2023 on Oct 8, 2023 Use "friendofspeaker" with for a 20% discount on the regular tickets. Follow up from docstrings: From Rhet John Hagen: You can certainly omit the type information from the docstring when you are using typehints. This is the way I've seen almost all modern usages of Google style docstrings nowadays. They still have some examples that include the type information because the original standard pre-dated Python 3 type annotations. Here is a simple example: https://github.com/johnthagen/python-blueprint/blob/main/src/fact/lib.py#L5 This also shows off the next point that you brought up: can I document all of the exceptions that a function could raise. Google docstrings have the "Raises:" block for this, and I find it pretty nice and concise for when this is needed. Also, PyCharm can be configured to autocomplete and render Google style docstrings https://www.jetbrains.com/help/pycharm/settings-tools-python-integrated-tools.html Tools | Python Integrated Tools | Docstrings | Docstring Format: Google What's nice about this, is that then PyCharm will render the google style docstrings in the Quick Doc function (Ctrl+Q), making the headers bold and larger and lists look nice so it's easy to read. Joke: Fully optimized my algorithm
    9/12/2023
    22:20
  • #351 A Python Empire (or MPIRE?)
    Topics covered in this episode: mpire mopup - the macOS Python.org Updater Immortal Objects for Python Common Docstring Formats in Python Extras Joke Watch on YouTube About the show Sponsored by Sentry: pythonbytes.fm/sentry Connect with the hosts Michael: @[email protected] Brian: @[email protected] Show: @[email protected] Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: mpire A Python package for easy multiprocessing, but faster than multiprocessing MPIRE is faster in most scenarios, packs more features, and is generally more user-friendly than the default multiprocessing package. Tons of features. Nice intro article with benchmarks. Brian #2: mopup - the macOS Python.org Updater Glyph Lefkowitz On a mac, install Python with the standard Python.org installer. Then, periodically, update with python3 -m mopup I just did it and went from Python 3.11.4 to 3.11.5 See also Get Your Mac Python From Python.org for reasons to use python.org over other ways, also from Glyph. Michael #3: Immortal Objects for Python Instagram has introduced Immortal Objects – PEP-683 – to Python. Brian #4: Common Docstring Formats in Python Scott Robinson I don’t mean to disrespect Scott, but I’m honestly curious if this is really common. I like docstrings for the “why” of a function. And prefer type hints for types. Let me know what you use, at @[email protected] Extras Brian: In search for a working retro Lunar Lander in Python Michael: Releases follow up North Korean hackers behind malicious VMConnect PyPI campaign Joke: It’s Bingo Time!
    9/6/2023
    35:23
  • #350 You've Got The Stamina For This Episode
    Topics covered in this episode: Make Each Line Count, Keeping Things Simple in Python Parsel A Comprehensive Guide to Python Logging with Structlog Stamina Extras Joke Watch on YouTube About the show Sponsored by Sentry: pythonbytes.fm/sentry Connect with the hosts Michael: @[email protected] Brian: @[email protected] Show: @[email protected] Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Brian #1: Make Each Line Count, Keeping Things Simple in Python Bob Belderbos Some great tips to help you simplify your Python code to make it more understandable and maintainable. Michael #2: Parsel Parsel is a BSD-licensed Python library to extract data from HTML, JSON, and XML documents. Parsel lets you extract data from XML/HTML documents using XPath or CSS selectors. It supports: CSS and XPath expressions for HTML and XML documents JMESPath expressions for JSON documents Regular expressions # Want a RSS feed detail from a website standard HTML? selector = parsel.Selector(text=html_text) for link in selector.css('head > link'): rel = link.xpath('.//@rel').get() rel_type = link.xpath('.//@type').get() href = link.xpath('.//@href').get() Brian #3: A Comprehensive Guide to Python Logging with Structlog Stanley Ulili structlog is an awesome logging tool, and already has great documentation. However, this article is a great starting point, highlighting: how easy it is to get started using structlog configuring the default log level changing the formatting customizing the time stamp adding custom fields adding contextual data filtering async … Michael #4: Stamina via Matthias Bach, by Hynek Production-grade Retries Made Easy stamina is an opinionated wrapper around the great-but-unopinionated Tenacity package. Its goal is to be as ergonomic as possible, while doing the right thing by default, while minimizing potential for misuse. General additions on top of Tenacity Retry only on certain exceptions. Exponential backoff with jitter between retries. Limit the number of retries and total time. Automatic async support. Preserve type hints of the decorated callable. Count (Prometheus) and log (structlog) retries with basic metadata, if they’re installed. Easy global deactivation for testing. Extras Brian: The “pytest fixtures” chapter of the pytest course is available now. Also, the PYTHONBYTES 20% discount still active for bundle through the end of August. Michael: Python 3.12.0 release candidate 1 released PyCon UK: The conference takes place from the 22nd to the 25th of September in Cardiff, Wales. The schedule is available at 2023.pyconuk.org/schedule/ and tickets are available at 2023.pyconuk.org/tickets/. PyData Eindhoven 2023, Nov 30 CFP open PyData Seattle Language Creators Charity Fundraiser: Adele Goldberg - Smalltalk, Guido Van Rossum, Anders Hejlsberg, C#, and James Gosling - Java. September 19, 2023: 12:00 - 4:00 PM, in person only. Joke: Librarian chatgpt-failures
    8/29/2023
    30:55
  • #349 Djangonauts: Ready for Takeoff!
    Topics covered in this episode: Omnivore app Djangonaut.space Server-side hot reload Python in Excel Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Python People Podcast Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @[email protected] Show: @[email protected] Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: Omnivore app Omnivore is the free, open source, read-it-later app for serious readers. Distraction free. Privacy focused. Open source. Designed for knowledge workers and lifelong learners. Save articles, newsletters, and documents and read them later — focused and distraction free. Add notes and highlights. Organize your reading list the way you want and sync it across all your devices. Syncs with popular Personal Knowledge Management systems including Logseq and Obsidian Wait, what’s Logseq? :) A privacy-first, open-source platform for knowledge management and collaboration. Kinda like Notion? Brian #2: Djangonaut.space “Where contributors launch” This is a group mentoring program where individuals will work self-paced in a semi-structured learning environment over the course of three months. Djangonauts are members of the community who wish to level up their current Django code contributions and potentially take on leadership roles in Django in the future. Michael #3: Server-side hot reload Thanks to Alex Riviere for some improvements Bill Mill suggests websockets and Adam Johnson points he built something like this for Django (sorta) with django-browser-reload To make it work just: Include this script in your web projects for dev-time auto reloading of web browser when any change is detected in content. Works across all web technologies, built out on a FastAPI / Tailwind project. General workflow looks like: Edit the source CSS file Tailwind watcher generates a built CSS file Built CSS file is included the Python web HTML template Template appends a hash ID for the state of the CSS file Changes to the source CSS thus trigger a change in the final ID New ID means the page contents change and the script does a reload Even works for static resources if you put a “version” indicator on them: [HTML_REMOVED] [HTML_REMOVED] Brian #4: Python in Excel Anaconda working with Microsoft to have Python built in to Excel. “Python in Excel is currently in preview and is subject to change based on feedback. To use this feature, join the Microsoft 365 Insider Program and choose the Beta Channel Insider level.” from Microsoft Support article: Getting started with Python in Excel Extras Brian: Working on videos for “Ch3 : pytest Fixtures” for the Python Testing with pytest Course Bundle Adding some drawings and some more bonus videos. Thanks to everyone who’s signed up already. I’ve pushed the 20% discount out till the end of August. I also finally listed it on pythontest.com/courses Also lots of new interviews for pythonpeople.fm, and I’m expecting at least one new episode of testandcode.com this week. It’s going to be a busy week. Michael: PyCon Sweden CFP is open Be on Talk Python around Mobile Apps? Joke: The Password Game KennyLog-in.com - secure password generator
    8/22/2023
    31:06

More Technology podcasts

About Python Bytes

Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, developer, and data science space.
Podcast website

Listen to Python Bytes, Lex Fridman Podcast and Many Other Stations from Around the World with the radio.net App

Python Bytes

Python Bytes

Download now for free and listen to the radio easily.

Google Play StoreApp Store