Python Bytes

By: Michael Kennedy and Brian Okken
  • Summary

  • 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.
    Copyright 2016-2024
    Show More Show Less
activate_Holiday_promo_in_buybox_DT_T2
Episodes
  • #411 TLS Client: Hello <>
    Nov 25 2024
    Topics covered in this episode: Talk Python rewritten in QuartPyPI now supports digital attestationsDjango Rusty TemplatesPEP 639 is now supported by PYPIExtrasJokeWatch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codesBrian: @brianokken@fosstodon.org / @brianokken.bsky.socialShow: @pythonbytes@fosstodon.org / @pythonbytes.bsky.social 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: Talk Python rewritten in Quart Rewrote all of talkpython.fm in Quart (10k lines of code total, 4k changed)Considered FastAPILitestarDjangoHugo Static Site + PythonFlaskDiscussed the multistage upgrade / conversion processAutomating tests for all 1,000 pages Brian #2: PyPI now supports digital attestations Dustin Ingram“Attestations provide a verifiable link to an upstream source repository: By signing with the identity of the upstream source repository, such as in the case of an upload of a project built with GitHub Actions, PyPI's support for digital attestations defines a strong and verifiable association between a file on PyPI and the source repository, workflow, and even the commit hash that produced and uploaded the file. Additionally, publishing attestations to a transparency log helps mitigate against both compromise of PyPI and compromise of the projects themselves.”For maintainers If using GH Actions and Trusted Publishing make sure you use pypa/gh-action-pypi-publish, version v1.11.0 or newerthat’s itIf not “Support for automatic attestation generation and publication from other Trusted Publisher environments is planned.”“While not recommended, maintainers can also manually generate and publish attestations.”See also PyPI Introduces Digital Attestations to Strengthen Python Package Security by Sarah GoodingAre we PEP 740 yet? Michael #3: Django Rusty Templates by Lily FooteAn experimental reimplementation of Django's templating language in Rust.Goals 100% compatibility of rendered output.Error reporting that is at least as useful as Django's errors.Improved performance over Django's pure Python implementation. Brian #4: PEP 639 is now supported by PYPI from Brett CannonPEP 639 – Improving License Clarity with Better Package MetadataFor project metadata, use these fields: license and license-files:Examples license field [project] license = "MIT" [project] license = "MIT AND (Apache-2.0 OR BSD-2-clause)" [project] license = "MIT OR GPL-2.0-or-later OR (FSFUL AND BSD-2-Clause)" [project] license = "LicenseRef-Proprietary" Examples of license-files: [project] license-files = ["LICEN[CS]E*", "AUTHORS*"] [project] license-files = ["licenses/LICENSE.MIT", "licenses/LICENSE.CC0"] [project] license-files = ["LICENSE.txt", "licenses/*"] [project] license-files = [] Extras Brian: Playground Wisdom: Threads Beat Async/Await - interesting read from Armin Ronacher about different language abstractions around concurrency.PythonTest.com Discord community is now live Launched last week, as of this morning we’ve got 89 membersAnyone already a pythontest community member has received an inviteAnyone can join through courses.pythontest.comEverything at pythontest.com is 20% off through Dec with code turkeysale2024“Python Testing with pytest” eBook 40% off through Dec 2, use code turkeysale2024 Michael: Python 3.14.0a2 releasedStarter packs: Michael’s Python people: https://bsky.app/starter-pack/mkennedy.codes/3lbdnupl26e2x Directory: https://blueskydirectory.com/starter-packs/all Joke: curl - heavy metal style!
    Show More Show Less
    40 mins
  • #410 Entering the Django core
    Nov 18 2024
    Topics covered in this episode: Thoughts on Django’s CorefuturepoolDon't return named tuples in new APIsZiglang: Migrating from AWS to Self-HostingExtrasJokeWatch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codesBrian: @brianokken@fosstodon.org / @brianokken.bsky.socialShow: @pythonbytes@fosstodon.org / @pythonbytes.bsky.social 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: Thoughts on Django’s Core Carlton GibsonGreat discussion on Django and Core vs PluginsSustainability with limited peopleKeeping core smallThe release cycleeembrace plugins vs endorsing plugins. Michael #2: futurepool via Pat DeckerTakes the concept of multiprocessing Pool to the async/await world.Create a pool then delegate the work: async with FuturePool(2) as fp: result = await fp.map(async_pool_fn, range(10)) I would LOVE to see something like this in a broader background asyncio worker pool concept.But that concept doesn’t exist in asyncio in Python and that’s a failing of the framework IMO. Brian #3: Don't return named tuples in new APIs Brett CannonFirst off, I’m grateful for any post that talks about APIs and the API is a module, class, or package API and not a Web/REST API. The term API existed long before the internet.“e.g., get_mouse_position() very likely has a two-item tuple of X and Y coordinates of the screen”“it actually makes your API more complex for both you and your users to use. For you, it doubles the data access API surface for your return type as you have to now support index-based and attribute-based data access forever (or until you choose to break your users and change your return type so it doesn't support both approaches)”“… you probably don't want people doing with your return type, like slicing, iterating over all the items …”Alternatives classdataclassdictionaryTypedDictSimpleNamespace“My key point in all of this is to prefer readability and ergonomics over brevity in your code. That means avoiding named tuples except where you are expanding to tweaking an existing API where the named tuple improves over the plain tuple that's already being used.” Michael #4: Ziglang: Migrating from AWS to Self-Hosting The Rust Foundation for example, reports that they spent $404,400 on infrastructure costs in 2023.Zig lang has decided to use a single big cloud machine + mirrors Extras Brian: Changing the Python Test community Was started to answer questions for Test & Code listeners years ago. Primarily pytest questionsUsed to be Slack. Then moved to Podia forum. Now I’m trying to work out a Discord solution that is both sustainable and usable. Michael: PWang Bsky essayBuilding A Business From Python Expertise - Michael Kennedy on Work Item PodcastSubscribe to package releases, just put .atom on the end of their releases URL, for example: github.com/mikeckennedy/jinja_partials/releases ← add .atom for RSSpytest-bdd 8.0.0 was just released via Jamie Thomson The big feature (in Jamie’s opinion) is the addition of data tables https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst#800---2024-11-14 Joke: Breaking: JavaScript Developer Commits to Framework for Record-Breaking 3 Weeks
    Show More Show Less
    31 mins
  • #409 We've moved to Hetzner write-up
    Nov 14 2024
    Topics covered in this episode: terminal-treeposting: The API client that lives in your terminalExtra, extra, extraUV does everything or enough that I'm not sure what else it needs to doExtrasJokeWatch on YouTube About the show Sponsored by: ScoutAPM - Django Application Performance MonitoringCodeium - Free AI Code Completion & Chat Connect with the hosts Michael: @mkennedy@fosstodon.orgBrian: @brianokken@fosstodon.orgShow: @pythonbytes@fosstodon.org 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: terminal-tree An experimental filesystem navigator for the terminal, built with TextualTested in macOS only at this point. Chances are very high it works on Linux. Slightly lower chance (but non-zero) that it works on Windows. Can confirm it works on Linux Brian #2: posting: The API client that lives in your terminal Also uses TextualFrom Darren BurnsInteresting that the installation instructions recommends using uv: uv tool install --python 3.12 postingVery cool. Great docs. Beautiful. keyboard centric, but also usable with a mouse.“Fly through your API workflow with an approachable yet powerful keyboard-centric interface. Run it locally or over SSH on remote machines and containers. Save your requests in a readable and version-control friendly format.”Able to save multiple environmentsGreat colorsAllows scripting to run Python code before and after requests to prepare headers, set variables, etc. Michael #3: Extra, extra, extra spaCy course swag give-away, enter for freeNew essay: Opposite of Cloud Native is?News: We've moved to HetznerNew package: Introducing chameleon-flask packageNew release: Listmonk Python clientTIOBE UpdatePEP 750 – Template StringsCanary emailLeft Omnivore, for Pocket, left Pocket for, …, landed on Instapaper Supports direct import from Omnivore and PocketThough Hoarder is compellingTrying out Zen Browser Wasn’t a fan of Arc (especially now) but the news turned me on to Zen Brian #4: UV does everything or enough that I'm not sure what else it needs to do Jeff Triplett“UV feels like one of those old infomercials where it solves everything, which is where we have landed in the Python world.”“My favorite feature is that UV can now bootstrap a project to run on a machine that does not previously have Python installed, along with installing any packages your application might require.”Partial list (see Jeff’s post for his complete list) uv pip install replaces pip installuv venv replaces python -m venvuv run, uv tool run, and uv tool install replaces pipxuv build - Build your Python package for pypiuv publish - Upload your Python package to pypi, replacing twine and flit publish Extras Brian: Coverage.py originally was just one fileTrying out BlueSky brianokken.bsky.social Not because of Taylor Swift, but nice. There are a lot of Python people there. Joke: How programmers sleep
    Show More Show Less
    35 mins

What listeners say about Python Bytes

Average customer ratings

Reviews - Please select the tabs below to change the source of reviews.