Podcasts about python3

  • 17PODCASTS
  • 955EPISODES
  • 47mAVG DURATION
  • 5WEEKLY NEW EPISODES
  • May 26, 2025LATEST

POPULARITY

20172018201920202021202220232024

Categories



Best podcasts about python3

Latest podcast episodes about python3

Python Bytes
#433 Dev in the Arena

Python Bytes

Play Episode Listen Later May 26, 2025 28:40 Transcription Available


Topics covered in this episode: git-flight-rules Uravelling t-strings neohtop Introducing Pyrefly: A new type checker and IDE experience for Python 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: git-flight-rules What are "flight rules"? A guide for astronauts (now, programmers using Git) about what to do when things go wrong. Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures. [...] NASA has been capturing our missteps, disasters and solutions since the early 1960s, when Mercury-era ground teams first started gathering "lessons learned" into a compendium that now lists thousands of problematic situations, from engine failure to busted hatch handles to computer glitches, and their solutions. Steps for common operations and actions I want to start a local repository What did I just commit? I want to discard specific unstaged changes Restore a deleted file Brian #2: Uravelling t-strings Brett Cannon Article walks through Evaluating the Python expression Applying specified conversions Applying format specs Using an Interpolation class to hold details of replacement fields Using Template class to hold parsed data Plus, you don't have to have Python 3.14.0b1 to try this out. The end result is very close to an example used in PEP 750, which you do need 3.14.0b1 to try out. See also: I've written a pytest version, Unravelling t-strings with pytest, if you want to run all the examples with one file. Michael #3: neohtop Blazing-fast system monitoring for your desktop Features Real-time process monitoring CPU and Memory usage tracking Beautiful, modern UI with dark/light themes Advanced process search and filtering Pin important processes Process management (kill processes) Sort by any column Auto-refresh system stats Brian #4: Introducing Pyrefly: A new type checker and IDE experience for Python From Facebook / Meta Another Python type checker written in Rust Built with IDE integration in mind from the beginning Principles Performance IDE first Inference (inferring types in untyped code) Open source I mistakenly tried this on the project I support with the most horrible abuses of the dynamic nature of Python, pytest-check. It didn't go well. But perhaps the project is ready for some refactoring. I'd like to try it soon on a more well behaved project. Extras Brian: Python: The Documentary Official Trailer Tim Hopper added Setting up testing with ptyest and uv to his “Python Developer Tooling Handbook” For a more thorough intro on pytest, check out courses.pythontest.com pocket is closing, I'm switching to Raindrop I got one question about code formatting. It's not highlighted, but otherwise not bad. Michael: New course! Polars for Power Users: Transform Your Data Analysis Game Apache Airflow 3.0 Released Paste 5 Joke: Theodore Roosevelt's Man in the Arena, but for programming

Talk Python To Me - Python conversations for passionate developers
#506: ty: Astral's New Type Checker (Formerly Red-Knot)

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later May 19, 2025 64:19 Transcription Available


The folks over at Astral have made some big-time impacts in the Python space with uv and ruff. They are back with another amazing project named ty. You may have known it as Red-Knot. But it's coming up on release time for the first version and with the release it comes with a new official name: ty. We have Charlie Marsh and Carl Meyer on the show to tell us all about this new project. Episode sponsors Posit Auth0 Talk Python Courses Links from the show Talk Python's Rock Solid Python: Type Hints & Modern Tools (Pydantic, FastAPI, and More) Course: training.talkpython.fm Charlie Marsh on Twitter: @charliermarsh Charlie Marsh on Mastodon: @charliermarsh Carl Meyer: @carljm ty on Github: github.com/astral-sh/ty A Very Early Play with Astral's Red Knot Static Type Checker: app.daily.dev Will Red Knot be a drop-in replacement for mypy or pyright?: github.com Hacker News Announcement: news.ycombinator.com Early Explorations of Astral's Red Knot Type Checker: pydevtools.com Astral's Blog: astral.sh Rust Analyzer Salsa Docs: docs.rs Ruff Open Issues (label: red-knot): github.com Ruff Types: types.ruff.rs Ruff Docs (Astral): docs.astral.sh uv Repository: github.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#432 How To Fix Your Computer

Python Bytes

Play Episode Listen Later May 19, 2025 25:48 Transcription Available


Topics covered in this episode: pre-commit: install with uv PEP 773: A Python Installation Manager for Windows (Accepted) Changes for Textual The Best Programmers I Know Extras Joke Watch on YouTube About the show Sponsored by NordLayer: pythonbytes.fm/nordlayer 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: pre-commit: install with uv Adam Johnson uv tool works great at keeping tools you use on lots of projects up to date quickly, why not use it for pre-commit. The extension of pre-commit-uv will use uv to create virtual environments and install packages fore pre-commit. This speeds up initial pre-commit cache creation. However, Adam is recommending this flavor of using pre-commit because it's just plain easier to install pre-commit and dependencies than the official pre-commit install guide. Win-win. Side note: No Adam, I'm not going to pronounce uv “uhv”, I'll stick with “you vee”, even Astral tells me I'm wrong Michael #2: PEP 773: A Python Installation Manager for Windows (Accepted) via pycoders newsletter One manager to rule them all – PyManager. PEP 773 replaces all existing Windows installers (.exe “traditional” bundle, per-version Windows Store apps, and the separate py.exe launcher) with a single MSIX app called Python Install Manager (nick-named PyManager). PyManager should be mainstream by CPython 3.15, and the traditional installer disappears no earlier than 3.16 (≈ mid-2027). Simple, predictable commands. python → launches “the best” runtime already present or auto-installs the latest CPython if none is found. py → same launcher as today plus management sub-commands: py install, py uninstall, py list, py exec, py help. Optional python3 and python3.x aliases can be enabled by adding one extra PATH entry. Michael #3: Changes for Textual Bittersweet news: the business experiment ends, but the code lives on. Textual began as a hobby project layered on top of Rich, but it has grown into a mature, “makes-the-terminal-do-the-impossible” TUI framework with an active community and standout documentation. Despite Textual's technical success, the team couldn't pinpoint a single pain-point big enough to sustain a business model, so the company will wind down in the coming weeks. The projects themselves aren't going anywhere: they're stable, battle-tested, and will continue under the stewardship of the original author and the broader community. Brian #4: The Best Programmers I Know Matthias Endler “I have met a lot of developers in my life. Lately, I asked myself: “What does it take to be one of the best? What do they all have in common?”” The list Read the reference Know your tools really well Read the error message Break down problems Don't be afraid to get your hands dirty Always help others Write Never stop learning Status doesn't matter Build a reputation Have patience Never blame the computer Don't be afraid to say “I don't know” Don't guess Keep it simple Each topic has a short discussion. So don't just ready the bullet points, check out the article. Extras Brian: I had a great time in Munich last week. I a talk at a company event, met with tons of people, and had a great time. The best part was connecting with people from different divisions working on similar problems. I love the idea of internal conferences to get people to self organize by topic and meet people they wouldn't otherwise, to share ideas. Also got started working on a second book on the plane trip back. Michael: Talk Python Clips (e.g. mullet) Embrace your cloud firewall (example). Python 3.14.0 beta 1 is here Congrats to the new PSF Fellows. Cancelled faster CPython https://bsky.app/profile/snarky.ca/post/3lp5w5j5tws2i Joke: How To Fix Your Computer

Talk Python To Me - Python conversations for passionate developers
#505: t-strings in Python (PEP 750)

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later May 13, 2025 71:59 Transcription Available


Python has many string formatting styles which have been added to the language over the years. Early Python used the % operator to injected formatted values into strings. And we have string.format() which offers several powerful styles. Both were verbose and indirect, so f-strings were added in Python 3.6. But these f-strings lacked security features (think little bobby tables) and they manifested as fully-formed strings to runtime code. Today we talk about the next evolution of Python string formatting for advanced use-cases (SQL, HTML, DSLs, etc): t-strings. We have Paul Everitt, David Peck, and Jim Baker on the show to introduce this upcoming new language feature. Episode sponsors Posit Auth0 Talk Python Courses Links from the show Guests: Paul on X: @paulweveritt Paul on Mastodon: @pauleveritt@fosstodon.org Dave Peck on Github: github.com Jim Baker: github.com PEP 750 – Template Strings: peps.python.org tdom - Placeholder for future library on PyPI using PEP 750 t-strings: github.com PEP 750: Tag Strings For Writing Domain-Specific Languages: discuss.python.org How To Teach This: peps.python.org PEP 501 – General purpose template literal strings: peps.python.org Python's new t-strings: davepeck.org PyFormat: Using % and .format() for great good!: pyformat.info flynt: A tool to automatically convert old string literal formatting to f-strings: github.com Examples of using t-strings as defined in PEP 750: github.com htm.py issue: github.com Exploits of a Mom: xkcd.com pyparsing: github.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Talk Python To Me - Python conversations for passionate developers
#504: Developer Trends in 2025

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later May 5, 2025 69:53 Transcription Available


What trends and technologies should you be paying attention to today? Are there hot new database servers you should check out? Or will that just be a flash in the pan? I love these forward looking episodes and this one is super fun. I've put together an amazing panel: Gina Häußge, Ines Montani, Richard Campbell, and Calvin Hendryx-Parker. We dive into the recent Stack Overflow Developer survey results as a sounding board for our thoughts on rising and falling trends in the Python and broader developer space. Episode sponsors NordLayer Auth0 Talk Python Courses Links from the show The Stack Overflow Survey Results: survey.stackoverflow.co/2024 Panelists Gina Häußge: chaos.social/@foosel Ines Montani: ines.io Richard Campbell: about.me/richard.campbell Calvin Hendryx-Parker: github.com/calvinhp Explosion: explosion.ai spaCy: spacy.io OctoPrint: octoprint.org .NET Rocks: dotnetrocks.com Six Feet Up: sixfeetup.com Stack Overflow: stackoverflow.com Python.org: python.org GitHub Copilot: github.com OpenAI ChatGPT: chat.openai.com Claude: anthropic.com LM Studio: lmstudio.ai Hetzner: hetzner.com Docker: docker.com Aider Chat: github.com Goose AI: goose.ai IndyPy: indypy.org OctoPrint Community Forum: community.octoprint.org spaCy GitHub: github.com Hugging Face: huggingface.co Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#431 Nerd Gas

Python Bytes

Play Episode Listen Later May 5, 2025 29:27 Transcription Available


Topics covered in this episode: pirel: Python release cycle in your terminal FastAPI Cloud Python's new t-strings Extras Joke Watch on YouTube About the show Sponsored by NordLayer: pythonbytes.fm/nordlayer 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: pirel: Python release cycle in your terminal pirel check shows release information about your active Python interpreter. If the active version is end-of-life, the program exits with code 1. If no active Python interpreter is found, the program exits with code 2. pirel list lists all Python releases in a table. Your active Python interpreter is highlighted. A picture is worth many words Brian #2: FastAPI Cloud Sebastián Ramírez, creator of FastAPI, announced today the formation of a new Company, FastAPI Cloud. Here's the announcement blog post: FastAPI Cloud - By The Same Team Behind FastAPI There's a wait list to try it out. Promises to turns deployment into fastapi login; fastapi deploy Side note: announcement includes quote from Daft Punk: Build Harder, Better, Faster, Stronger I just included this in a talk I'm gave last week (and will again next week), where I modify this to “Build Easier, Better, Faster, Stronger” Sebastian and I are both fans of the rocket emoji. BTW, we first covered FastAPI on episode 123 in 2019 Brian #3: Python's new t-strings Dave Peck, one of the authors of PEP 750, which will go into Python 3.14 We covered t-strings in ep 428 In article t-strings security benefits over f-strings How to work with t-strings A Pig Latin example Also, I think I have always done this wrong Is it the first consonant to the end? or the first consonant cluster? So… Brian → Rianbay? or Ianbray? BTW, this is an example of nerdgassing What's next once t-strings ship? On thing that's next (in Python 3.15, maybe, is using t-strings in shlex and subprocess) PEP 787 – Safer subprocess usage using t-strings deferred to 3.15 Michael #4: zev A simple CLI tool to help you remember terminal commands. Examples: # Find running processes zev 'show all running python processes' # File operations zev 'find all .py files modified in the last 24 hours' # System information zev 'show disk usage for current directory' # Network commands zev 'check if google.com is reachable' # Git operations zev 'show uncommitted changes in git' Again, picture worth many words: Extras Brian: Holy Grail turns 50 nerdgassing Michael: Transcripts are a bit better now. Zen is better now Joke: Can my friend come in?

Talk Python To Me - Python conversations for passionate developers
#503: The PyArrow Revolution

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Apr 28, 2025 68:36 Transcription Available


Pandas is at a the core of virtually all data science done in Python, that is virtually all data science. Since it's beginning, Pandas has been based upon numpy. But changes are afoot to update those internals and you can now optionally use PyArrow. PyArrow comes with a ton of benefits including it's columnar format which makes answering analytical questions faster, support for a range of high performance file formats, inter-machine data streaming, faster file IO and more. Reuven Lerner is here to give us the low-down on the PyArrow revolution. Episode sponsors NordLayer Auth0 Talk Python Courses Links from the show Reuven: github.com/reuven Apache Arrow: github.com Parquet: parquet.apache.org Feather format: arrow.apache.org Python Workout Book: manning.com Pandas Workout Book: manning.com Pandas: pandas.pydata.org PyArrow CSV docs: arrow.apache.org Future string inference in Pandas: pandas.pydata.org Pandas NA/nullable dtypes: pandas.pydata.org Pandas `.iloc` indexing: pandas.pydata.org DuckDB: duckdb.org Pandas user guide: pandas.pydata.org Pandas GitHub issues: github.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#430 Or you go to jail

Python Bytes

Play Episode Listen Later Apr 28, 2025 29:11 Transcription Available


Topics covered in this episode: pip 25.1 has dependency groups, pylock.toml, plus more aiohttp goes free threaded uv 0.6.15 supports pylock.toml Whenever Extras Joke Watch on YouTube About the show Sponsored by Porkbun! Use our link pythonbytes.fm/porkbun and get a .app or .dev domain for $5.99 at Porkbun. 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: pip 25.1 has dependency groups, pylock.toml, plus more post What's new in pip 25.1 - Dependency groups! Richard Si Discovered this through Hugo van Kemenade Dependency groups, PEP 735, supported # pyproject.toml [dependency-groups] test = ["pytest", "pytest-xdist"] lint = ["mypy", "isort"] # Dependency Groups can include other groups! ✨ dev = [ {include-group = "test"}, {include-group = "lint"} ] Package installation progress bar Resumable downloads Experimental lockfile generation, PEP 751, with pip lock so cool pip index versions is stable, no longer experimental use this to get a list of available versions ex: python3 -m pip index versions pytest-check combine with --json to get a nice script readable output Michael #2: aiohttp goes free threaded Thanks to months of consistent contributions by Lysandros Nikolaou, all of the mandatory dependencies of #aiohttp now ship free-threaded variants of #wheels! This unlocks the same in aiohttp! Brian #3: uv 0.6.15 supports pylock.toml Discovered through Brett Cannon So far, these projects support pylock.toml pip pip-audit pdm uv With uv To export a uv.lock to the pylock.toml format, run: uv export -o pylock.toml To generate a pylock.toml file from a set of requirements, run: uv pip compile -o pylock.toml -r requirements.in To install from a pylock.toml file, run: uv pip sync pylock.toml or uv pip install -r pylock.toml Michael #4: Whenever via Pat Decker Typed and DST-safe datetimes for Python, available in Rust or pure Python. Whenever helps you write correct and type checked datetime code. It's also way faster than other third-party libraries—and usually the standard library as well. Extras Brian: Every UUID Michael: New Vulnerability in GitHub Copilot and Cursor: How Hackers Can Weaponize Code Agents via Brian Skinn And typosquatting in the AI age Firefox Send alternatives file.pizza via @rafaelwo bitwarden send Joke: Can you Vibe? Interview with Vibe Coder in 2025 Senior Engineer tries Vibe Coding

Talk Python To Me - Python conversations for passionate developers
#502: Django Ledger: Accounting with Python

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Apr 21, 2025 63:38 Transcription Available


Do you or your company need accounting software? Well, there are plenty of SaaS products out there that you can give your data to. but maybe you also really like Django and would rather have a foundation to build your own accounting system exactly as you need for your company or your product. On this episode, we're diving into Django Ledger, created by Miguel Sanda, which can do just that. Episode sponsors Auth0 Talk Python Courses Links from the show Miguel Sanda on Twitter: @elarroba Miguel on Mastodon: @elarroba@fosstodon.org Miguel on GitHub: github.com Django Ledger on Github: github.com Django Ledger Discord: discord.gg Get Started with Django MongoDB Backend: mongodb.com Wagtail CMS: wagtail.org Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#429 Nitpicking Python

Python Bytes

Play Episode Listen Later Apr 21, 2025 27:24 Transcription Available


Topics covered in this episode: Huly CVE Foundation formed to take over CVE program from MITRE drawdb 14 Advanced Python Features Extras Joke Watch on YouTube About the show Sponsored by Posit Workbench: pythonbytes.fm/workbench 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: Huly All-in-One Project Management Platform (alternative to Linear, Jira, Slack, Notion, Motion) If you're primarily interested in self-hosting Huly without the intention to modify or contribute to its development, please use huly-selfhost. Manage your tasks efficiently with Huly's bidirectional GitHub synchronization. Use Huly as an advanced front-end for GitHub Issues and GitHub Projects. Connect every element of your workflow to build a dynamic knowledge base. Everything you need for productive team work: Team Planner • Project Management • Virtual Office • Chat • Documents • Inbox Self hosting as a service: elest.io Brian #2: CVE Foundation formed to take over CVE program from MITRE Back story: CVE, global source of cybersecurity info, was hours from being cut by DHS The 25-year-old CVE program, an essential part of global cybersecurity, is cited in nearly any discussion or response to a computer security issue. CVE was at real risk of closure after its contract was set to expire on April 16. The nonprofit MITRE runs CVE on a contract with the DHS. A letter last Tuesday sent Tuesday by Yosry Barsoum, vice president of MITRE, gave notice of the potential halt to operations. Another possible victim of the current administration. CVE Foundation Launched to Secure the Future of the CVE Program CVE Board members have spent the past year developing a strategy to transition CVE to a dedicated, non-profit foundation. The new CVE Foundation will focus solely on continuing the mission of delivering high-quality vulnerability identification and maintaining the integrity and availability of CVE data for defenders worldwide. Over the coming days, the Foundation will release more information about its structure, transition planning, and opportunities for involvement from the broader community. Michael #3: drawdb Free and open source, simple, and intuitive database design editor, data-modeler, and SQL generator. Great drag-drop relationship manager Define your DB visually, export as SQL create scripts Or import existing SQL to kickstart the diagramming. Brian #4: 14 Advanced Python Features Edward Li Picking some favorites 1. Typing Overloads 2. Keyword-only and Positional-only Arguments 9. Python Nitpicks For-else statements Walrus operator Short Circuit Evaluation Operator Chaining Extras Michael: Thunderbird send / other firefox things. Joke: Python Tariffs Thanks wagenrace Thanks Campfire Tales

Talk Python To Me - Python conversations for passionate developers
#501: Marimo - Reactive Notebooks for Python

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Apr 14, 2025 60:35 Transcription Available


Have you ever spent an afternoon wrestling with a Jupyter notebook, hoping that you ran the cells in just the right order, only to realize your outputs were completely out of sync? Today's guest has a fresh take on solving that exact problem. Akshay Agrawal is here to introduce Marimo, a reactive Python notebook that ensures your code and outputs always stay in lockstep. And that's just the start! We'll also dig into Akshay's background at Google Brain and Stanford, what it's like to work on the cutting edge of AI, and how Marimo is uniting the best of data science exploration and real software engineering. Episode sponsors Worth Search Talk Python Courses Links from the show Akshay Agrawal: akshayagrawal.com YouTube: youtube.com Source: github.com Docs: marimo.io Marimo: marimo.io Discord: marimo.io WASM playground: marimo.new Experimental generate notebooks with AI: marimo.app Pluto.jl: plutojl.org Observable JS: observablehq.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#428 How old is your Python?

Python Bytes

Play Episode Listen Later Apr 14, 2025 31:00 Transcription Available


Topics covered in this episode: How to Write a Git Commit Message Caddy Web Server Some new PEPs approved juv Extras Joke Watch on YouTube About the show Sponsored by Posit Connect: pythonbytes.fm/connect 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: How to Write a Git Commit Message Chris Beams 7 rules of a great commit message Separate subject from body with a blank line Limit the subject line to 50 characters Capitalize the subject line Do not end the subject line with a period Use the imperative mood in the subject line Wrap the body at 72 characters Use the body to explain what and why vs. how Article also includes Why a good commit message matters Discussion about each of the 7 rules Cool hat tips to other articles on the subject “Keep in mind: This has all been said before.” Each word is a different link. Michael #2: Caddy Web Server via Fredrik Mellström Like a more modern NGINX Caddy automatically obtains and renews TLS certificates for all your sites. Caddy's native configuration is a JSON document. Even localhost and internal IPs are served with TLS using the intermediate of a fully-automated, self-managed CA that is automatically installed into most local trust stores. Configure multiple Caddy instances with the same storage, and they will automatically coordinate certificate management as a fleet. Production-grade static file server. Brian #3: Some new PEPs approved PEP 770 – Improving measurability of Python packages with Software Bill-of-Materials Accepted for packaging Author: Seth Larson, Sponsor Brett Cannon “This PEP proposes using SBOM documents included in Python packages as a means to improve automated software measurability for Python packages.” PEP 750 – Template Strings Accepted for Python 3.14 Author: Jim Baker, Guido van Rossum, Paul Everitt, Kaudai Aono, Lysandros Nikolaou, Dave Peck “Templates provide developers with access to the string and its interpolated values before they are combined. This brings native flexible string processing to the Python language and enables safety checks, web templating, domain-specific languages, and more.” Michael #4: juv A toolkit for reproducible Jupyter notebooks, powered by uv. Create, manage, and run Jupyter notebooks with their dependencies Pin dependencies with PEP 723 - inline script metadata Launch ephemeral sessions for multiple front ends (e.g., JupyterLab, Notebook, NbClassic) Powered by uv for fast dependency management Use uvx to run jupyterlab with ephemeral virtual environments and tracked dependencies. Extras Brian: Status of Python versions new-ish format Use this all the time. Can't remember if we've covered the new format yet. See also Python endoflife.date Same dates, very visible encouragement to move on to Python 3.13 if you haven't already. Michael: Python 3.13.3 is out. .git-blame-ignore-revs follow up Joke: BGPT (thanks Doug Farrell)

Talk Python To Me - Python conversations for passionate developers
#500: Django Simple Deploy and other DevOps Things

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Apr 10, 2025 57:34 Transcription Available


We're sitting down with Eric Matthes, the educator, author, and developer behind Django Simple Deploy. If you've ever struggled with taking that final step of getting your Django app onto a live server (without spending days wrestling with DevOps complexities), then give Django Simple Deploy a look. Eric shares how Django Simple Deploy automates away the boilerplate parts of deployment, so you can focus on building features instead of deciphering endless configs. We'll talk about this new project's journey to 1.0, the range of hosting platforms it supports, and why it's not just for beginners. Episode sponsors Worth Search Talk Python Courses Links from the show django-simple-deploy documentation: readthedocs.io django-simple-deploy repository: github.com Python Crash Course book: ehmatthes.github.io Code Red: codered.cloud Docker: docker.com Caddy: caddyserver.com Bunny.net CDN: bunny.net Platform.sh: platform.sh fly.io: fly.io Heroku: heroku.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#427 Rise of the Python Lord

Python Bytes

Play Episode Listen Later Apr 7, 2025 36:31 Transcription Available


Topics covered in this episode: Git Town solves the problem that using the Git CLI correctly PEP 751 – A file format to record Python dependencies for installation reproducibility git-who and watchgha Share Python Scripts Like a Pro: uv and PEP 723 for Easy Deployment Extras Joke Watch on YouTube About the show Sponsored by Posit Package Manager: pythonbytes.fm/ppm 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: Git Town solves the problem that using the Git CLI correctly Git Town is a reusable implementation of Git workflows for common usage scenarios like contributing to a centralized code repository on platforms like GitHub, GitLab, or Gitea. Think of Git Town as your Bash scripts for Git, but fully engineered with rock-solid support for many use cases, edge cases, and error conditions. Keep using Git the way you do now, but with extra commands to create various branch types, keep them in sync, compress, review, and ship them efficiently. Basic workflow Commands to create, work on, and ship features. git town hack - create a new feature branch git town sync - update the current branch with all ongoing changes git town switch - switch between branches visually git town propose - propose to ship a branch git town ship - deliver a completed feature branch Additional workflow commands Commands to deal with edge cases. git town delete - delete a feature branch git town rename - rename a branch git town repo - view the Git repository in the browser Brian #2: PEP 751 – A file format to record Python dependencies for installation reproducibility Accepted From Brett Cannon “PEP 751 has been accepted! This means Python now has a lock file standard that can act as an export target for tools that can create some sort of lock file. And for some tools the format can act as their primary lock file format as well instead of some proprietary format.” File name: pylock.toml or at least something that starts with pylock and ends with .toml It's exciting to see the start of a standardized lock file Michael #3: git-who and watchgha git-who is a command-line tool for answering that eternal question: Who wrote this code?! Unlike git blame, which can tell you who wrote a line of code, git-who tells you the people responsible for entire components or subsystems in a codebase. You can think of git-who sort of like git blame but for file trees rather than individual files. And watchgha - Live display of current GitHub action runs by Ned Batchelder Brian #4: Share Python Scripts Like a Pro: uv and PEP 723 for Easy Deployment Dave Johnson Nice full tutorial discussing single file Python scripts using uv with external dependencies Starting with a script with dependencies. Using uv add --script [HTML_REMOVED] [HTML_REMOVED] to add a /// script block to the top Using uv run Adding #!/usr/bin/env -S uv run --script shebang Even some Windows advice Extras Brian: April 1 pranks done well BREAKING: Guido van Rossum Returns as Python's BDFL including Brett Cannon noted as “Famous Python Quotationist” Guido taking credit for “I came for the language but I stayed for the community” which was from Brett then Brett's title of “Famous Python Quotationist” is crossed out. Barry Warsaw asking Guido about releasing Python 2.8 Barry is the FLUFL, “Friendly Language Uncle For Life “ Mariatta can't get Guido to respond in chat until she addresses him as “my lord”. “… becoming one with whitespace.” “Indentation is Enlightenment” Upcoming new keyword: maybe Like “if” but more Pythonic as in Maybe: print("Python The Documentary - Coming This Summer!") I'm really hoping there is a documentary April 1 pranks done poorly Note: pytest-repeat works fine with Python 3.14, and never had any problems If you have to explain the joke, maybe it's not funny. The explanation pi, an irrational number, as in it cannot be expressed by a ratio of two integers, starts with 3.14159 and then keeps going, and never repeats. Python 3.14 is in alpha and people could be testing with it for packages Test & Code is doing a series on pytest plugins pytest-repeat is a pytest plugin, and it happened to not have any tests for 3.14 yet. Now the “joke”. I pretended that I had tried pytest-repeat with Python 3.14 and it didn't work. Test & Code: Python 3.14 won't repeat with pytest-repeat Thus, Python 3.14 won't repeat. Also I mentioned that there was no “rational” explanation. And pi is an irrational number. Michael: pysqlscribe v0.5.0 has the “parse create scripts” feature I suggested! Markdown follow up Prettier to format Markdown via Hugo Been using mdformat on some upcoming projects including the almost done Talk Python in Production book. Command I like is mdformat --number --wrap no ./ uv tool install --with is indeed the pipx inject equivalent, but requires multiple --with's: pipx inject mdformat mdformat-gfm mdformat-frontmatter mdformat-footnote mdformat-gfm-alerts uv tool install mdformat --with mdformat-gfm --with mdformat-frontmatter --with mdformat-footnote --with mdformat-gfm-alerts uv follow up From James Falcon As a fellow uv enthusiast, I was still holding out for a use case that uv hasn't solved. However, after last week's episode, you guys finally convinced me to switch over fully, so I figured I'd explain the use case and how I'm working around uv's limitations. I maintain a python library supported across multiple python versions and occasionally need to deal with bugs specific to a python version. Because of that, I have multiple virtualenvs for one project. E.g., mylib38 (for python 3.8), mylib313 (for python 3.13), etc. I don't want a bunch of .venv directories littering my project dir. For this, pyenv was fantastic. You could create the venv with pyenv virtualenv 3.13.2 mylib313, then either activate the venv with pyenv activate mylib313 and create a .python-version file containing mylib313 so I never had to manually activate the env I want to use by default on that project. uv doesn't have a great solution for this use case, but I switched to a workflow that works well enough for me: Define my own central location for venvs. For me that's ~/v Create venvs with something like uv venv --python 3.13 ~/v/mylib313 Add a simple function to my bashrc: `workon() { source ~/v/$1/bin/activate } so now I can run workon mylib313orworkon mylib38when I need to work in a specific environment. uv's.python-version` support works much differently than pyenv's, and that lack of support is my biggest frustration with this approach, but I am willing to live without it. Do you Firefox but not Zen? You can now make pure Firefox more like Zen's / Arc's layout. Joke: So here it will stay See the follow up thread too! Also: Guido as Lord Python via Nick Muoh

Talk Python To Me - Python conversations for passionate developers
#499: BeeWare and the State of Python on Mobile

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Mar 31, 2025 67:47 Transcription Available


This episode is all about Beeware, the project that working towards true native apps built on Python, especially for iOS and Android. Russell's been at this for more than a decade, and the progress is now hitting critical mass. We'll talk about the Toga GUI toolkit, building and shipping your apps with Briefcase, the newly official support for iOS and Android in CPython, and so much more. I can't wait to explore how BeeWare opens up the entire mobile ecosystem for Python developers, let's jump right in. Episode sponsors Posit Python in Production Talk Python Courses Links from the show Anaconda open source team: anaconda.com PEP 730 – Adding iOS: peps.python.org PEP 738 – Adding Android: peps.python.org Toga: beeware.org Briefcase: beeware.org emscripten: emscripten.org Russell Keith-Magee - Keynote - PyCon 2019: youtube.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#426 Committing to Formatted Markdown

Python Bytes

Play Episode Listen Later Mar 31, 2025 29:18 Transcription Available


Topics covered in this episode: mdformat pre-commit-uv PEP 758 and 781 Serie: rich git commit graph in your terminal, like magic Extras Joke Watch on YouTube About the show Sponsored by Posit Connect Cloud: pythonbytes.fm/connect-cloud 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: mdformat Suggested by Matthias Schöttle Last episode Michael covered blacken-docs, and I mentioned it'd be nice to have an autoformatter for text markdown. Matthias delivered with suggesting mdformat “Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.” A python project that can be run on the command line. Uses a style guide I mostly agree with. I'm not a huge fan of numbered list items all being “1.”, but that can be turned off with --number, so I'm happy. Converts underlined headings to #, ##, etc. headings. Lots of other sane conventions. The numbering thing is also sane, I just think it also makes the raw markdown hard to read. Has a plugin system to format code blocks Michael #2: pre-commit-uv via Ben Falk Use uv to create virtual environments and install packages for pre-commit. Brian #3: PEP 758 and 781 PEP 758 – Allow except and except* expressions without parentheses accepted PEP 781 – Make TYPE_CHECKING a built-in constant draft status Also, PEP Index by Category kinda rocks Michael #4: Serie: rich git commit graph in your terminal, like magic While some users prefer to use Git via CLI, they often rely on a GUI or feature-rich TUI to view commit logs. Others may find git log --graph sufficient. Goals Provide a rich git log --graph experience in the terminal. Offer commit graph-centric browsing of Git repositories. Extras Michael: Sunsetting Search? (Startpage) Ruff in or out? Joke: Wishing for wishes

Talk Python To Me - Python conversations for passionate developers
#498: Algorithms for high performance terminal apps

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Mar 24, 2025 68:16 Transcription Available


In this episode, we welcome back Will McGugan, the creator of the wildly popular Rich library and founder of Textualize. We'll dive into Will's latest article on "Algorithms for High Performance Terminal Apps" and explore how he's quietly revolutionizing what's possible in the terminal, from smooth animations and dynamic widgets to full-on TUI (or should we say GUI?) frameworks. Whether you're looking to supercharge your command-line tools or just curious how Python can push the limits of text-based UIs, you'll love hearing how Will's taking a modern, web-inspired approach to old-school terminals. Episode sponsors Posit Python in Production Talk Python Courses Links from the show Algorithms for high performance terminal apps post: textual.textualize.io Textual Demo: github.com Textual: textualize.io Zero ver: 0ver.org memray: github.com Posting app: posting.sh Bulma CSS framewokr: bulma.io JP Term: davidbrochart.github.io Rich: github.com btop: github.com starship: starship.rs Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#425 If You Were a Klingon Programmer

Python Bytes

Play Episode Listen Later Mar 24, 2025 37:55 Transcription Available


Topics covered in this episode: Why aren't you using uv? Python Developer Tooling Handbook Calling all doc writers: blacken-docs Reinventing notebooks as reusable Python programs Extras Joke Watch on YouTube About the show Brought to you by Posit Connect: pythonbytes.fm/connect. 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: Why aren't you using uv? Fun conversation on X by Armin Ronacher. Interesting quotes from the thread I get it replaces pip/pyenv, but should I also use it instead of the built in 'python -m venv .venv'? But I need python installed to make python programs? Because it places the venv in the project folder and I can't run executables from there due to corporate policy. Many such cases. No idea why astral doesn't address this with more urgency. Sounds like a bad corporate policy :) i'm too lazy to switch from pyenv and pip trust issues, what if they do a bait and switch … Because everyone said that about poetry and I'm not sure I'm really ready to get hurt again. Masochism Many times I tried a lot of similar tools and always come back to pip and pip-tools. Them are just work, why should I spend my time for something "cool" that will bring more problems? I tried this week but I was expecting a "uv install requests" instead of "uv add". Switched back to pipenv. we partially use it. will transition when Dependabot support is available. I'll leave it with → Jared Scheel: Seeing a whole lotta Stockholm Syndrome in the replies to this question. Brian #2: Python Developer Tooling Handbook Tim Hopper “This is not a book about programming Python. Instead, the goal of this book is to help you understand the ecosystem of tools used to make Python development easier and more productive” Covers tools related to packaging, linting, formatting, and managing dependencies. Michael #3: Calling all doc writers: blacken-docs Run black on python code blocks in documentation files You can also install blacken-docs as a pre-commit hook. It supports Markdown, reStructuredText, and LaTex files. Additionally, you can run it on Python files to reformat Markdown and reStructuredText within docstrings. Brian #4: Reinventing notebooks as reusable Python programs marimo allows you to store notebooks as plaintext Python files properties Git-friendly: small code change => small diff easy for both humans and computers to read importable as a Python module, without executing notebook cells executable as a Python script editable with a text editor Also, … testing with pytest “Because marimo notebooks are just Python files, they are interoperable with other tools for Python — including pytest. “ “Testing cells. Any cell named as test_* is automatically discoverable and testable by pytest. The same goes for any cell that contains only test_ functions and Test classes.” “Importantly, because cells are wrapped in functions, running pytest test_notebook.py doesn't execute the entire notebook — just its tests.” Extras Brian: PyConUS announces Refund Policy for International Attendees New format now live for The Complete pytest Course Bundle and component courses Each course now available separately also pytest Primary Power is 13 lessons, 3.9 hours Using pytest with Projects, 10 lessons, 3.4 hours pytest Booster Rockets, 6 lessons, 1.3 hours of content New format is easier to navigate Better for people who like different speeds. I'm usually a 1.25x-1.5x speed person. Now also with Congratulations! lessons (with fireworks) and printable certificates. Michael: PyCon Taiwan is currently calling for proposals HN trends follow up via Shinjitsu I'm sure some other Hacker News reader has already given you the feedback, but in the unlikely case that they haven't, You read those headlines in this segment exactly wrong. “Ask HN: Who is hiring?" is a monthly post that asks employers to post about jobs they have available “Ask HN: Who wants to be hired?” is a monthly topic where they ask people who are looking for jobs to post about themselves in the hope that their skillset it is a good match (and not an LLM generated resume) So unfortunately your rosy analysis might need a less rosy interpretation. Joke: Top 12 things likely to be overheard if you had a Klingon Programmer From Holgi on Mastodon

Talk Python To Me - Python conversations for passionate developers
#497: Outlier Detection with Python

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Mar 21, 2025 55:22 Transcription Available


Have you ever wondered why certain data points stand out so dramatically? They might hold the key to everything from fraud detection to groundbreaking discoveries. This week on Talk Python to Me, we dive into the world of outlier detection with Python with Brett Kennedy. You'll learn how outliers can signal errors, highlight novel insights, or even reveal hidden patterns lurking in the data you thought you understood. We'll explore fresh research developments, practical use cases, and how outlier detection compares to other core data science tasks like prediction and clustering. If you're ready to spot those game-changing anomalies in your own projects, stay tuned. Episode sponsors Posit Python in Production Talk Python Courses Links from the show Data-morph: github.com PyOD: github.com Prophet: github.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#424 We Will Test in Production

Python Bytes

Play Episode Listen Later Mar 17, 2025 27:23 Transcription Available


Topics covered in this episode: The weird quirk with rounding in Python Python interpreter adds tail calls Remove punctuation from a string with translate and maketrans Extra, extra, extra 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: The weird quirk with rounding in Python Tom Nijhof-Verheesb With numbers ending in .5, Python always rounds to an even number. round(0.5) → 0 round(1.5) → 2 etc This follows IEEE 754 You can use decimal if you need a different behavior. Michael #2: Python interpreter adds tail calls Ken Jin, a member of the project, has merged a new set of changes that have been benchmarked as improving performance by 10% for some architectures. "Speedup is roughly equal to 2 minor CPython releases worth of improvements. For example, CPython 3.12 roughly sped up by 5%.” Brian #3: Remove punctuation from a string with translate and maketrans Rodrigo “Don't use the method replace to remove punctuation from a Python string. Instead, use the method translate.” Michael #4: Extra, extra, extra Animation v Coding, hello world to transformers TypeScript rewritten in Go Firefox lies PyCon's Startup Row Python in Production Book Extras Joke: Startrek Testing

Talk Python To Me - Python conversations for passionate developers
#496: Scaf: Complete blueprint for new Python Kubernetes projects

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Mar 14, 2025 79:34 Transcription Available


Today we explore the wild world of Python deployment with my friend, Calvin Hendricks-Parker from Six Feet Up. We'll tackle some of the biggest challenges in taking a Python app from “it works on my machine” to production, covering inconsistent environments, conflicting dependencies, and sneaky security pitfalls. Along the way, Calvin shares how containerization with Docker and Kubernetes can both simplify and complicate deployments, especially for smaller teams. Finally, we'll introduce Scaf, a powerful project blueprint designed to give developers a rock-solid start on Python web projects of all sizes. Get notified when the Talk Python in Production book goes live and read the first third online right now. Episode sponsors Posit Python in Production Talk Python Courses Links from the show Calvin Hendryx-Parker: github.com Scaf on GitHub: github.com Scaf on GitHub (duplicate): github.com "Deploy the Dream" song: deploy-the-dream-talk-python.mp3 CloudDevEngineering YouTube Channel: youtube.com TechWorld with Nana YouTube Channel: youtube.com Tilt (Kubernetes Dev Tool): tilt.dev Talos (Minimal OS for Kubernetes): talos.dev Traefik Reverse Proxy: traefik.io Sealed Secrets on GitHub: github.com Argo CD Documentation: readthedocs.io MailHog on GitHub: github.com Next.js: nextjs.org Cloud Custodian: cloudcustodian.io Valky (Redis Replacement): valkey.io “The ‘Works on My Machine' Certification Program” (Coding Horror): blog.codinghorror.com NVIDIA's First Desktop AI PC (Ars Technica): arstechnica.com Kind (Kubernetes in Docker): kind.sigs.k8s.io Updated Effective PyCharm Course: training.talkpython.fm Talk Python in Production book: talkpython.fm/books/python-in-production Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#423 Traveling the Python Universe

Python Bytes

Play Episode Listen Later Mar 10, 2025 26:49 Transcription Available


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

Python Bytes
#422 You need 4 spaces

Python Bytes

Play Episode Listen Later Mar 3, 2025 32:52 Transcription Available


Topics covered in this episode: My 2025 uv-based Python Project Layout for Production Apps aiolimiter A peek into a possible future of Python in the browser Reloadium 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: My 2025 uv-based Python Project Layout for Production Apps Hynek Schlawack Discusses uv, a simple pyproject.toml, a simple project layout, and uv.lock as the modern way to ditch requirements.txt files This is the starting video in a series, but it's already very worthwhile Michael #2: aiolimiter An efficient implementation of a rate limiter for asyncio. This project implements the Leaky bucket algorithm, giving you precise control over the rate a code section can be entered. Brian #3: A peek into a possible future of Python in the browser a.k.a “Secret SPy Stuff” Łukasz Langa A peek at SPy, a new language for Python on the web. Michael #4: Reloadium Hot Reloading and Profiling for Python If you are a PyCharm user please check out Reloadium plugin See also: github.com/mikeckennedy/server-hot-reload Extras Brian: Making an alternate version of The Complete pytest Course Michael: Book: Zero Day: A Jeff Aiken Novel Warp terminal on Windows is out. PyCon Ed Summit announced. Joke: py programmer walks into a bar

Talk Python To Me - Python conversations for passionate developers
#495: OSMnx: Python and OpenStreetMap

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Feb 24, 2025 61:55 Transcription Available


On this episode, I'm joined by Dr. Jeff Boeing, an assistant professor at the University of Southern California whose research spans urban planning, spatial analysis, and data science. We explore why OpenStreetMap is such a powerful source of global map data—and how Jeff's Python library, OSMnx, makes that data easier to download, model, and visualize. Along the way, we talk about what shapes city streets around the world, how urban design influences everything from daily commutes to disaster resilience, and why turning open data into accessible tools can open up completely new ways of understanding our cities. If you've ever wondered how to build or analyze your own digital maps in Python, or what it takes to manage a project that transforms raw geographic data into meaningful research, you won't want to miss this conversation. Episode sponsors Posit Podcast Later Talk Python Courses Links from the show City Street Orientations World: geoffboeing.com OSMnx Documentation: readthedocs.io OSMnx GitHub: github.com OpenStreetMap: openstreetmap.org Open Database License: opendatacommons.org ID Editor (Web Editor): wiki.openstreetmap.org Planet OSM: planet.openstreetmap.org Overpass API: wiki.openstreetmap.org GeoPandas: geopandas.org NetworkX: networkx.org Shapely: shapely.readthedocs.io Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#421 22 years old

Python Bytes

Play Episode Listen Later Feb 24, 2025 22:49 Transcription Available


Topics covered in this episode: httpdbg PyPI Now Supports iOS and Android Wheels for Mobile Python Development Arcade Game Platform goes 3.0 PEP 765 – Disallow return/break/continue that exit a finally block 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: httpdbg A tool for Python developers to easily debug the HTTP(S) client requests in a Python program. To use it, execute your program using the pyhttpdbg command instead of python and that's it. Open a browser to http://localhost:4909 to view the requests Brian #2: PyPI Now Supports iOS and Android Wheels for Mobile Python Development Sara Gooding “the Python Packaging Index (PyPI) has officially begun accepting and distributing pre-compiled binary packages, known as "wheels," for both iOS and Android platforms. “ Next up, “cibuildwheel Updates Are in Progress to Simplify iOS and Android Wheel Creation” Michael #3: Arcade Game Platform goes 3.0 via Maic Siemering This is our first major release since 2022. It keeps the beginner-friendly API while adding power and efficiency. Arcade now supports both standard OpenGL and ShaderToy (www.shadertoy.com) a-shaders through a compatibility layer. Since 3.0 is a major release, the full list of changes is over in github.com/pythonarcade/arcade/blob/development/CHANGELOG.md Brian #4: PEP 765 – Disallow return/break/continue that exit a finally block Accepted for Python 3.14 I wouldn't have thought to do this anyway, but it's weird, so don't. Will become a SyntaxWarning catchable by running with -We Extras Brian: Correction: Niki Tonsky was originator of “Pride Versioning”. Thanks Nikita Correction: Scheme is actually awesome. Brian is just a curmudgeon Also: pytest-rerunfailures is good for exposing flaky tests And apparently me being wrong was a great to get at least one person to blog more. Cheers Filip Łajszczak Michael: Tea pot follow up While you're right that some software actually had this implemented, Python does not. It's not an officially accepted HTTP status code, it was proposed in a 'joke' RFC. I guess Python - even though its name comes from the funny TV series Monty Python - is not so funny. httpx, your (or at least -my-) favorite HTTP module for python, does have the I_AM_A_TEAPOT constant. By the way, there are some HTTP status codes that changed their names in RFC 9110, for instance, http.HTTPStatus.UNPROCESSABLE_CONTENT (422, previously UNPROCESSABLE_ENTITY) Pride follow up fosstodon.org/@kytta/114034442981727301 Time to upgrade your mini? Joke: How old is she?

Talk Python To Me - Python conversations for passionate developers
#494: Update on Flet: Python + Flutter UIs

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Feb 21, 2025 60:23 Transcription Available


As Python developers, we're incredibly lucky to have over half a million packages that we can use to build our applications with over at PyPI. However, when it comes to choosing a UI framework, the options get narrowed down very quickly. Intersect those choices with the ones that work on mobile, and you have a very short list. Flutter is a UI framework for building desktop and mobile applications, and is in fact the one that we used to build the Talk Python courses app, you'd find at talkpython.fm/apps. That's why I'm so excited about Flet. Flet is a Python UI framework that is distributed and executed on the Flutter framework, making it possible to build mobile apps and desktop apps with Python. We have Feodor Fitsner back on the show after he launched his project a couple years ago to give us an update on how close they are to a full featured mobile app framework in Python. Episode sponsors Posit Podcast Later Talk Python Courses Links from the show Flet: flet.dev Flet on Github: github.com Packaging apps with Flet: flet.dev/docs/publish Flutter: flutter.dev React vs. Flutter: trends.stackoverflow.co Kivy: kivy.org Beeware: beeware.org Mobile forge from Beeware: github.com The list of built-in binary wheels: flet.dev/docs/publish/android#binary-python-packages Difference between dynamic and static Flet web apps: flet.dev/docs/publish/web Integrating Flutter packages: flet.dev/docs/extend/integrating-existing-flutter-packages serious_python: pub.dev/packages/serious_python Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

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

Python Bytes

Play Episode Listen Later Feb 17, 2025 27:47 Transcription Available


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

Talk Python To Me - Python conversations for passionate developers
#493: Quarto: Open-source technical publishing

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Feb 9, 2025 65:01 Transcription Available


In this episode, I'm joined by JJ Allaire, founder and executive chairman at Posit, and Carlos Scheidegger, a software engineer at Posit, to explore Quarto, an open-source tool revolutionizing technical publishing. We discuss how Quarto empowers users to seamlessly transform Jupyter notebooks into polished reports, dashboards, e-books, websites, and more. JJ shares his journey from creating RStudio to developing Quarto as a versatile, multi-language tool, while Carlos delves into its roots in reproducibility and the challenges of academic publishing. Don't miss this deep dive into a tool that's shaping the future of data-driven storytelling! Episode sponsors Talk Python Courses DigitalOcean Links from the show JJ Allaire JJ on LinkedIn: linkedin.com JJ on GitHub: github.com Carlos Scheidegger Personal site: cscheid.net Mastodon: @scheidegger Fast AI: fast.ai nbdev: nbdev.fast.ai nbsanity - Share Notebooks as Polished Web Pages in Seconds: answer.ai Pandoc: pandoc.org Observable: github.com Quarto Pub: quartopub.com Deno: deno.com Real World Data Science site: realworlddatascience.net Typst: typst.app Github Actions for Quarto: github.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#419 Is your back end popular?

Python Bytes

Play Episode Listen Later Feb 4, 2025 30:06 Transcription Available


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.

Talk Python To Me - Python conversations for passionate developers
#492: Great Tables

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Jan 30, 2025 64:21 Transcription Available


Join me as I chat with Rich Iannone and Michael Chow from Posit where we explore the transformative power of data tables with the Great Tables library. We'll cover practical applications of Great Tables, showcasing how thoughtful design and advanced formatting can elevate your data presentations. And you'll learn about innovative features like nano plots and interactive elements and the importance of structure, format, and style in crafting tables that both inform and inspire. Whether you're a seasoned data scientist or just starting out, this episode is packed with valuable tips and inspiring examples to enhance your data storytelling. Episode sponsors Talk Python Courses DigitalOcean Links from the show Michael Chow: github.com/machow Richard Iannone: github.com/rich-iannone Episode Deep Dives Writeup: talkpython.fm/blog Great Tables: github.com Making Beautiful, Publication Quality Tables PyCon talk: youtube.com Andrew Weatherman's Visualization Gallery: aweatherman.com Bureau of the Census Manual of Tabular Presentation: census.gov Table Contest: posit.co Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#418 I'm a tea pot

Python Bytes

Play Episode Listen Later Jan 27, 2025 20:22 Transcription Available


Topics covered in this episode: In memoriam: Michael Foord 1974-2025 Valkey (Redis Replacement) 30 best practices for software development and testing mimetype.io 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: In memoriam: Michael Foord 1974-2025 Guido van Rossum and others We've just lost Michael Foord this last weekend. From Guido: “Michael, an original thinker if there ever was one, started the tradition of having Language Summit events at PyCon, IIRC together with Barry Warsaw. He also wrote and contributed the influential mock library. … “ “PS. Feel free to post your own (positive) memories of meeting Michael – perhaps his children (10 and 13) will read them when they're older and this thread might help them remember their father.” I've added my memories. I think this is a great (and small) way to honor him. My friend Michael - Nicholas Tolervey After 5 years of trying, I did get an interview with Michael. I wish I'd have gotten that followup. Test & Code episode with Michael, ep 145, “For those about to mock” Michael #2: Valkey (Redis Replacement) Thanks Calvin HP An open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues. Can act as a primary database. Valkey can run as either a standalone daemon or in a cluster, with options for replication and high availability. Valkey natively supports a rich collection of datatypes, including strings, numbers, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs and more. You can operate on data structures in-place with an expressive collection of commands. Brian #3: 30 best practices for software development and testing Michael Foord (from 2017) Some gems 1 - YAGNI 6 - Unit tests test to the unit of behavior, not the unit of implementation. 8 - Code is the enemy: It can go wrong, and it needs maintenance. Write less code. Delete code. Don't write code you don't need. 15 - The more you have to mock out to test your code, the worse your code is. and so many more … Michael #4: mimetype.io I'm always forgetting content types! Also, shout out to httpstatuses.io Extras Brian: Python 1.0.0 released 31 years ago Michael: Python 3.14.0 alpha 4 is out Joke: Tea Time

Python Bytes
#417 Bugs hide from the light

Python Bytes

Play Episode Listen Later Jan 21, 2025 23:35 Transcription Available


Topics covered in this episode: LLM Catcher On PyPI Quarantine process RESPX Unpacking kwargs with custom objects 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: LLM Catcher via Pat Decker Large language model diagnostics for python applications and FastAPI applications . Features Exception diagnosis using LLMs (Ollama or OpenAI) Support for local LLMs through Ollama OpenAI integration for cloud-based models Multiple error handling approaches: Function decorators for automatic diagnosis Try/except blocks for manual control Global exception handler for unhandled errors from imported modules Both synchronous and asynchronous APIs Flexible configuration through environment variables or config file Brian #2: On PyPI Quarantine process Mike Fiedler Project Lifecycle Status - Quarantine in his "Safety & Security Engineer: First Year in Review post” Some more info now in Project Quarantine Reports of malware in a project kick things off Admins can now place a project in quarantine, allowing it to be unavailable for install, but still around for analysis. New process allows for packages to go back to normal if the report is false. However Since August, the Quarantine feature has been in use, with PyPI Admins marking ~140 reported projects as Quarantined. Of these, only a single project has exited Quarantine, others have been removed. Michael #3: RESPX Mock HTTPX with awesome request patterns and response side effects A simple, yet powerful, utility for mocking out the HTTPX, and HTTP Core, libraries. Start by patching HTTPX, using respx.mock, then add request routes to mock responses. For a neater pytest experience, RESPX includes a respx_mock fixture Brian #4: Unpacking kwargs with custom objects Rodrigo A class needs to have a keys() method that returns an iterable. a __getitem__() method for lookup Then double splat ** works on objects of that type. Extras Brian: A surprising thing about PyPI's BigQuery data - Hugovk Top PyPI Packages (and therefore also Top pytest Plugins) uses a BigQuery dataset Has grabbed 30-day data of 4,000, then 5,000, then 8,000 packages. Turns out 531,022 packages (amount returned when limit set to a million) is the same cost. So…. hoping future updates to these “Top …” pages will have way more data. Also, was planning on recording a Test & Code episode on pytest-cov today, but haven't yet. Hopefully at least a couple of new episodes this week. Finally updated pythontest.com with BlueSky links on home page and contact page. Michael: Follow up from Owen (uv-secure): Thanks for the multiple shout outs! uv-secure just uses the PyPi json API at present to query package vulnerabilities (same as default source for pip audit). I do smash it asynchronously for all dependencies at once... but it still takes a few seconds. Joke: Bugs hide from the light!

Python Bytes
#416 A Ghostly Episode

Python Bytes

Play Episode Listen Later Jan 13, 2025 43:41 Transcription Available


Topics covered in this episode: Terminals & Shells Winloop: An Alternative library for uvloop compatibility with windows Ruff & uv uv-secure 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: Terminals & Shells Ghostty is out Started by Mitchel Hashimoto, one of the co-founders of Hashicorp “Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native. While there are many excellent terminal emulators available, they all force you to choose between speed, features, or native UIs. Ghostty provides all three.” Currently for macOS & Linux (Windows planned) Version 1.0.1 released Dec 31, announced in Oct Features: cross-platform, windows, tabs, and splits, Themes, Ligatures, … Shell Integration: Some Ghostty features require integrating with your shell. Ghostty can automatically inject shell integration for bash, zsh, fish, and elvish. Fish is moving to Rust “fish is a smart and user-friendly command line shell with clever features that just work, without needing an advanced degree in bash scriptology.” “fish 4.0 is a big upgrade. It's got lots of new features to make using the command line easier and more enjoyable, such as more natural key binding and expanded history search. And under the hood, we've rebuilt the foundation in Rust.” Michael #2: Winloop: An Alternative library for uvloop compatibility with windows via Owen Lamont An alternative library for uvloop compatibility with windows . It always felt disappointing when libuv is available for windows but windows was never compatible with uvloop. Brian #3: Ruff & uv Ruff 0.9.0 has a new 2025 style guide f-string formatting improvements Now formats expressions interpolated inside f-string curly braces Quotes normalized according to project config Unnecessary escapes removed Examines interpolated expressions to see if splitting the string over multiple lines is ok Other changes to, but it's the f-string improvements I'm excited about. Python 3.14.0a3 is out, and available with uv uv python install 3.14 --preview Michael #4: uv-secure by Owen Lamont (yes again :) ) This tool will scan PyPi dependencies listed in your uv.lock files (or uv generated requirements.txt files) and check for known vulnerabilities listed against those packages and versions in the PyPi json API. I don't intend uv-secure to ever create virtual environments or do dependency resolution - the plan is to leave that all to uv since it does that so well and just target lock files and fully pinned and dependency resolved requirements.txt files). Works “out of the box” with a requirements.txt from uv pip compile. Extras Brian: Test & Code Season 2: pytest plugins Season 1 was something like 223 episodes over 9.5 years Started the summer of 2015 Send in pytest plugin suggestions to Brian on BlueSky or Mastodon or the contact form at pythontest.com Michael: Episode Deep Dive feature at Talk Python Feedback on social media: Those deep dives look really handy. Yes, those ARE really handy! Thanks for doing that. wow, yes please! This is awesome. Wow, this is amazing. … It helps when going back to check something (without having to re-listen). PyCon Austria at.pycon.org Heavy metal status codes Beautiful Soup feedback CFA via Sumana Harihareswara Joke: That's a stupid cup

Talk Python To Me - Python conversations for passionate developers
#491: DuckDB and Python: Ducks and Snakes living together

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 27, 2024 62:03 Transcription Available


Join me for an insightful conversation with Alex Monahan, who works on documentation, tutorials, and training at DuckDB Labs. We explore why DuckDB is gaining momentum among Python and data enthusiasts, from its in-process database design to its blazingly fast, columnar architecture. We also dive into indexing strategies, concurrency considerations, and the fascinating way MotherDuck (the cloud companion to DuckDB) handles large-scale data seamlessly. Don't miss this chance to learn how a single pip install could totally transform your Python data workflow! Episode sponsors Sentry Error Monitoring, Code TALKPYTHON Data Citizens Podcast Talk Python Courses Links from the show Alex on Mastodon: @__Alex__ DuckDB: duckdb.org MotherDuck: motherduck.com SQLite: sqlite.org Moka-Py: github.com PostgreSQL: www.postgresql.org MySQL: www.mysql.com Redis: redis.io Apache Parquet: parquet.apache.org Apache Arrow: arrow.apache.org Pandas: pandas.pydata.org Polars: pola.rs Pyodide: pyodide.org DB-API (PEP 249): peps.python.org/pep-0249 Flask: flask.palletsprojects.com Gunicorn: gunicorn.org MinIO: min.io Amazon S3: aws.amazon.com/s3 Azure Blob Storage: azure.microsoft.com/products/storage Google Cloud Storage: cloud.google.com/storage DigitalOcean: www.digitalocean.com Linode: www.linode.com Hetzner: www.hetzner.com BigQuery: cloud.google.com/bigquery DBT (Data Build Tool): docs.getdbt.com Mode: mode.com Hex: hex.tech Python: www.python.org Node.js: nodejs.org Rust: www.rust-lang.org Go: go.dev .NET: dotnet.microsoft.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Talk Python To Me - Python conversations for passionate developers
#490: Django Ninja

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 24, 2024 64:32 Transcription Available


If you're a Django developer, I'm sure you've heard so many people raving about FastAPI and Pydantic. But you really love Django and don't want to switch. Then you might want to give Django Ninja a serious look. Django Ninja is highly inspired by FastAPI, but is also deeply integrated into Django itself. We have Vitaliy Kucheryaviy the creator of Django Ninja on this show to tell us all about it. Episode sponsors Sentry Error Monitoring, Code TALKPYTHON Bluehost Talk Python Courses Links from the show Vitaly: github.com/vitalik Vitaly on X: @vital1k Top 5 Episodes of 2024: talkpython.fm/blog/posts/top-talk-python-podcast-episodes-of-2024 Django Ninja: django-ninja.dev Motivation section we talked through: django-ninja.dev/motivation LLM for Django Ninja: llm.django-ninja.dev Nano Django: github.com/vitalik/nano-django Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to Talk Python on YouTube: youtube.com Talk Python on Bluesky: @talkpython.fm at bsky.app Talk Python on Mastodon: talkpython Michael on Bluesky: @mkennedy.codes at bsky.app Michael on Mastodon: mkennedy

Python Bytes
#415 Just put the fries in the bag bro

Python Bytes

Play Episode Listen Later Dec 23, 2024 32:59 Transcription Available


Topics covered in this episode: dbos-transact-py Typed Python in 2024: Well adopted, yet usability challenges persist RightTyper Lazy self-installing Python scripts with uv 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: dbos-transact-py DBOS Transact is a Python library providing ultra-lightweight durable execution. Durable execution means your program is resilient to any failure. If it is ever interrupted or crashes, all your workflows will automatically resume from the last completed step. Under the hood, DBOS Transact works by storing your program's execution state (which workflows are currently executing and which steps they've completed) in a Postgres database. Incredibly fast, for example 25x faster than AWS Step Functions. Brian #2: Typed Python in 2024: Well adopted, yet usability challenges persist Aaron Pollack on Engineering at Meta blog “Overall findings 88% of respondents “Always” or “Often” use Types in their Python code. IDE tooling, documentation, and catching bugs are drivers for the high adoption of types in survey responses, The usability of types and ability to express complex patterns still are challenges that leave some code unchecked. Latency in tooling and lack of types in popular libraries are limiting the effectiveness of type checkers. Inconsistency in type check implementations and poor discoverability of the documentation create friction in onboarding types into a project and seeking help when using the tools. “ Notes Seems to be a different survey than the 2023 (current) dev survey. Diff time frame and results. July 29 - Oct 8, 2024 Michael #3: RightTyper A fast and efficient type assistant for Python, including tensor shape inference Brian #4: Lazy self-installing Python scripts with uv Trey Hunner Creating your own ~/bin full of single-file command line scripts is common for *nix folks, still powerful but underutilized on Mac, and trickier but still useful on Windows. Python has been difficult in the past to use for standalone scripts if you need dependencies, but that's no longer the case with uv. Trey walks through user scripts (*nix and Mac) Using #! for scripts that don'thave dependencies Using #! with uv run --script and /// script for dependencies Discussion about how uv handles that. Extras Brian: Courses at pythontest.com If you live in a place (or are in a place in your life) where these prices are too much, let me know. I had a recent request and I really appreciate it. Michael: Python 3.14 update released Top episodes of 2024 at Talk Python Universal check for updates macOS: Settings > Keyboard > Keyboard shortcuts > App shortcuts > + Then add shortcut for single app, ^U and the menu title. Joke: Python with rizz

Talk Python To Me - Python conversations for passionate developers
#489: Anaconda Toolbox for Excel and more with Peter Wang

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 20, 2024 69:09 Transcription Available


Peter Wang has been pushing Python forward since the early days of its data science roots. We're lucky to have him back on the show. We're going to talk about the Anaconda Toolbox for Excel as well as many other trends and topics that are hot in the Python space right now. I'm sure you'll enjoy listening to the two of us exchanging our takes on the topics and trends. Episode sponsors Sentry Error Monitoring, Code TALKPYTHON Bluehost Talk Python Courses Links from the show Peter on BSky: @wang.social Michael on BSky: @mkennedy.codes Michael's Curated BSky Starter List: bsky.app Python Blsky Starter Pack List: blueskydirectory.com Anaconda Toolbox for Microsoft Excel: anaconda.com JupyterLite: jupyter.org 8 of the Biggest Excel Mistakes of All Time: blog.hurree.co The Five Demons of Python Packaging PyBay talk: youtube.com PEP 759: peps.python.org TIOBE Index: tiobe.com pyscript: pyscript.net Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Python Bytes
#414 Because we are not monsters

Python Bytes

Play Episode Listen Later Dec 16, 2024 29:45 Transcription Available


Topics covered in this episode: New project to shorten django-admin to django because we are not monsters django-unicorn: The magical reactive component framework for Django Testing some tidbits The State of Python 2024 article 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: New project to shorten django-admin to django because we are not monsters Jeff Tripplet has created django-cli-no-admin to shorten django-admin to just django. “One of the biggest mysteries in Django is why I have to run django-admin from my terminal instead of just running django. Confusingly, django-admin has nothing to do with Django's admin app.” Instead of typing things like: django-admin startproject mysite projectname We can type the shorter: django startproject mysite projectname I love this kind of developer speedup / comfort improvements And yes, Jeff wants Django to eventually include this as the default way to run the command line utilities. Michael #2: django-unicorn: The magical reactive component framework for Django Add modern site functionality: Quickly add in simple interactions to regular Django templates without learning a new templating language. Skip the JavaScript build tools No API required: Skip creating a bunch of serializers and just use Django. Brian #3: Testing some tidbits Ned Batchelder Different ways to test to see if a string has only 0 or 1 in it. And also, a way to check all the different ways to make sure they work. Fun post, and I learned about cleandoc - a way to strip leading blank space and maintain code block indentation I usually use textwrap.dedent() partition - splitting strings based on a substring Using | to pass imports to eval() - I don't use eval much. However, no pytest! Here's a way to check all this with pytest: Testing some tidbits with pytest Michael #4: The State of Python 2024 article Python usage with other languages drops as general adoption grows 41% of Python developers have under 2 years of experience Python learning expands through diverse channels The Python 2 vs. 3 divide is in the distant past Flask, Django, and FastAPI remain top Python web frameworks Most Python web apps run on hyperscale clouds Containers over VMs over hardware uv takes Python packaging by storm Extras Brian: More Django: Dracula Theme for Django Admin Michael: Zen Browser update Office refresh Transcripts (in some players) Joke: Volkswagen, passing all the tests

Talk Python To Me - Python conversations for passionate developers
#488: Multimodal data with LanceDB

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 12, 2024 58:19 Transcription Available


LanceDB is a developer-friendly, open source database for AI. It's used by well-known companies such as Midjourney and Character.ai. We have Chang She, the CEO and cofounder of LanceDB on to give us a look at the concept of multi-modal data and how you can use LanceDB in your own Python apps. Episode sponsors Sentry Error Monitoring, Code TALKPYTHON Bluehost Talk Python Courses Links from the show Chang She: @changhiskhan Chang on Github: github.com LanceDB: lancedb.com LanceDB Source: github.com Embeddings API: github.com MinIO: min.io LanceDB Quickstart: github.com VectorDB-recipes: github.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Python Bytes
#413 python-build-standalone finds a home

Python Bytes

Play Episode Listen Later Dec 9, 2024 30:39 Transcription Available


Topics covered in this episode: jiter A new home for python-build-standalone moka-py uv: An In-Depth Guide 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: jiter Fast iterable JSON parser. About to be the backend for Pydantic and Logfire. Currently powers OpenAI / ChatGPT (along with Pydantic itself), at least their Python library, maybe more. jiter has three interfaces: JsonValue an enum representing JSON data Jiter an iterator over JSON data PythonParse which parses a JSON string into a Python object jiter-python - This is a standalone version of the JSON parser used in pydantic-core. The recommendation is to only use this package directly if you do not use pydantic Brian #2: A new home for python-build-standalone Charlie Marsh See also Transferring Python Build Standalone Stewardship to Astral from Gregory Szorc python-build-standalone is the project that has prebuilt binaries for different architectures. used by uv python install 3.12 and uv venv .venv --python 3.12 and uv sync This is good stability news for everyone. Interesting discussion of prebuilt Python from Charlie Michael #3: moka-py A high performance caching library for Python written in Rust moka-py is a Python binding for the highly efficient Moka caching library written in Rust. This library allows you to leverage the power of Moka's high-performance, feature-rich cache in your Python projects. Features Synchronous Cache: Supports thread-safe, in-memory caching for Python applications. TTL Support: Automatically evicts entries after a configurable time-to-live (TTL). TTI Support: Automatically evicts entries after a configurable time-to-idle (TTI). Size-based Eviction: Automatically removes items when the cache exceeds its size limit using the TinyLFU policy. Concurrency: Optimized for high-performance, concurrent access in multi-threaded environments. Brian #4: uv: An In-Depth Guide On SaaS Pegasus blog, so presumably by Cory Zue Good intro to uv Also a nice list of everyday commands Install python: uv python install 3.12 I don't really use this anymore, as uv venv .venv --python 3.12 or uv sync install if necessary create a virtual env: uv venv .venv --python 3.12 install stuff: uv pip install django add project dependencies build pinned dependencies Also discussion about adopting the new workflow Extras Brian: PydanticAI - not sure why I didn't see that coming In the “good to know” and “commentary on society” area: Anti-Toxicity Features on Bluesky The WIRED Guide to Protecting Yourself From Government Surveillance Michael: Go sponsor a bunch of projects on GitHub Registration is open for PyCon Joke: Inf

Python Bytes
#412 Closing the loop

Python Bytes

Play Episode Listen Later Dec 2, 2024 26:00 Transcription Available


Topics covered in this episode: Loop targets asyncstdlib Bagels: TUI Expense Tracker rloop: An AsyncIO event loop implemented in Rust 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: Loop targets Ned Batchelder I don't think I would have covered this had it not been the surprising opposition to Ned's code. Here's the snippet: params = { "query": QUERY, "page_size": 100, } *# Get page=0, page=1, page=2, ...* **for** params["page"] in itertools.count(): data = requests.get(SEARCH_URL, params).json() **if** not data["results"]: **break** ... Ned is utilizing the assignment in the for loop to use the value of count() and store it into the params["page"]. The article includes another version with a temp variable page_num, which I think the naysayers would prefer. But frankly, I think both are fine. Why not put the value right where you want it? Michael #2: asyncstdlib The asyncstdlib library re-implements functions and classes of the Python standard library to make them compatible with async callables, iterables and context managers. It is fully agnostic to async event loops and seamlessly works with asyncio, third-party libraries such as trio, as well as any custom async event loop. Full set of async versions of advantageous standard library helpers, such as zip, map, enumerate, functools.reduce, itertools.tee, itertools.groupby and many others. Safe handling of async iterators to ensure prompt cleanup, as well as various helpers to simplify safely using custom async iterators. Small but powerful toolset to seamlessly integrate existing sync code into async programs and libraries. Brian #3: Bagels: TUI Expense Tracker Jax Tam “Bagels expense tracker is a TUI application where you can track and analyse your money flow, with convenience oriented features and a complete interface. Why an expense tracker in the terminal? I found it easier to build a habit and keep an accurate track of my expenses if I do it at the end of the day, instead of on the go. So why not in the terminal where it's fast, and I can keep all my data locally?” Who hasn't wanted to write their own expense tracker? This implementation is fun for lots of reasons It's still new and pretty small, so forking it for your own uses should be easy Built on textual is fun install instructions based on uv tool seems to be the new normal: uv tool install --python 3.13 bagels test suite started pretty useful as is, actually Nice that it includes a roadmap of future goals Would be a fun project to help out with for anyone looking for anyone looking for a shiny new codebase to contribute to. Michael #4: rloop: An AsyncIO event loop implemented in Rust An AsyncIO event loop implemented in Rust From Giovanni Barillari, Creator of Granian RLoop is an AsyncIO event loop implemented in Rust on top of the mio crate. Disclaimer: This is a work in progress and definitely not ready for production usage. Run asyncio.set_event_loop_policy(rloop.EventLoopPolicy()) and done. Similar to uvloop. Extras Brian: I'm currently listening to Four Thousand Weeks - Time Management for Mortals by Oliver Burkeman for the second time. Highly recommend. Development Advent Calendars for 2024 - Adrian Roselli Black Friday at PythonTest.com Michael: Docker cluster monitor Compare engagement across Mastodon / Bsky / Twitter https://bsky.app/profile/pythonbytes.fm/post/3lbseqgr5m22z https://fosstodon.org/@pythonbytes/113545509565796190 https://x.com/pythonbytes/status/1861166179236319288 Back on #277 we talked about StrEnum. Got a nice chance to use it this weekend. Maybe Finance Go sponsor a bunch of projects on GitHub Black Friday at Talk Python Joke: CTRL + X onion

Talk Python To Me - Python conversations for passionate developers
#487: Building Rust Extensions for Python

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 1, 2024 62:24 Transcription Available


There has been a lot of changes in the low-level Python space these days. The biggest has to be how many projects have rewritten core performance-intensive sections in Rust. Or even the wholesale adoption of Rust for newer projects such as uv and ruff. On this episode, we dive into the tools and workflow needed to build these portions of Python apps in Rust with David Seddon and Samuel Colvin. Episode sponsors Posit Data Citizens Podcast Talk Python Courses Links from the show Samuel Colvin: github.com/samuelcolvin David Seddon: github.com/seddonym Pydantic: pydantic.dev PEP 0759: peps.python.org TypeShed: github.com Maturin: maturin.rs rloop: github.com Grimp: github.com Grimp Workflows: github.com White House recommends memory safe languages: whitehouse.gov Installing Rust: rust-lang.org jiter: github.com import-linter: github.com Logfire: pydantic.dev Crabs in Snakes, David Seddon, Pycon Italia: youtube.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Python Bytes
#411 TLS Client: Hello <<guitar solo>>

Python Bytes

Play Episode Listen Later Nov 25, 2024 40:03 Transcription Available


Topics covered in this episode: Talk Python rewritten in Quart PyPI now supports digital attestations Django Rusty Templates PEP 639 is now supported by PYPI 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: Talk Python rewritten in Quart Rewrote all of talkpython.fm in Quart (10k lines of code total, 4k changed) Considered FastAPI Litestar Django Hugo Static Site + Python Flask Discussed the multistage upgrade / conversion process Automating 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 newer that's it If 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 Gooding Are we PEP 740 yet? Michael #3: Django Rusty Templates by Lily Foote An 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 Cannon PEP 639 – Improving License Clarity with Better Package Metadata For 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 members Anyone already a pythontest community member has received an invite Anyone can join through courses.pythontest.com Everything at pythontest.com is 20% off through Dec 2 with code turkeysale2024 “Python Testing with pytest” eBook 40% off through Dec 2, use code turkeysale2024 Michael: Python 3.14.0a2 released Starter 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!

Talk Python To Me - Python conversations for passionate developers
#486: CSnakes: Embed Python code in .NET

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Nov 22, 2024 62:45 Transcription Available


If you are a .NET developer or work in a place that has some of those folks, wouldn't it be great to fully leverage the entirety of PyPI with it's almost 600,000 packages inside your .NET code? But how would you do this? Previous efforts have let you write Python syntax but using the full libraries (especially the C-based ones) has been out of reach, until CSnakes. This project by Anthony Shaw and Aaron Powell unlocks some pretty serious integration between the two languages. We have them both here on the show today to tell us all about it. Episode sponsors Posit Bluehost Talk Python Courses Links from the show Anthony Shaw: github.com Aaron Powell: github.com Introducing CSnakes: tonybaloney.github.io CSnakes: tonybaloney.github.io Talk Python: We've moved to Hetzner: talkpython.fm/blog Talk Python: Talk Python rewritten in Quart (async Flask): talkpython.fm/blog Pyjion - A JIT for Python based upon CoreCLR: github.com Iron Python: ironpython.net Python.NET: pythonnet.github.io The buffer protocol: docs.python.org Avalonia UI: avaloniaui.net Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Python Bytes
#410 Entering the Django core

Python Bytes

Play Episode Listen Later Nov 18, 2024 30:42 Transcription Available


Topics covered in this episode: Thoughts on Django's Core futurepool Don't return named tuples in new APIs Ziglang: Migrating from AWS to Self-Hosting 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 Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @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 Gibson Great discussion on Django and Core vs Plugins Sustainability with limited people Keeping core small The release cycle eembrace plugins vs endorsing plugins. Michael #2: futurepool via Pat Decker Takes 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 Cannon First 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 class dataclass dictionary TypedDict SimpleNamespace “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 questions Used 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 essay Building A Business From Python Expertise - Michael Kennedy on Work Item Podcast Subscribe to package releases, just put .atom on the end of their releases URL, for example: github.com/mikeckennedy/jinja_partials/releases ← add .atom for RSS pytest-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

Talk Python To Me - Python conversations for passionate developers
#485: Secure coding for Python with SheHacksPurple

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Nov 15, 2024 69:28 Transcription Available


What do developers need to know about AppSec and building secure software? We have Tonya Janca (AKA SheHacksPurple) on the show to tell us all about it. We talk about what developers should expect from threat modeling events as well as concrete tips for security your apps and services. Episode sponsors Posit Bluehost Talk Python Courses Links from the show Tanya on X: @shehackspurple She Hacks Purple website: shehackspurple.ca White House recommends memory safe languages: whitehouse.gov Python Developer Survey Results: jetbrains.com Bandit: github.com Semgrep Academy: academy.semgrep.dev Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Python Bytes
#409 We've moved to Hetzner write-up

Python Bytes

Play Episode Listen Later Nov 14, 2024 35:07 Transcription Available


Topics covered in this episode: terminal-tree posting: The API client that lives in your terminal Extra, extra, extra UV does everything or enough that I'm not sure what else it needs to do Extras Joke Watch on YouTube About the show Sponsored by: ScoutAPM - Django Application Performance Monitoring Codeium - Free AI Code Completion & Chat Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @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 Textual Tested 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 Textual From Darren Burns Interesting that the installation instructions recommends using uv: uv tool install --python 3.12 posting Very 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 environments Great colors Allows 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 free New essay: Opposite of Cloud Native is? News: We've moved to Hetzner New package: Introducing chameleon-flask package New release: Listmonk Python client TIOBE Update PEP 750 – Template Strings Canary email Left Omnivore, for Pocket, left Pocket for, …, landed on Instapaper Supports direct import from Omnivore and Pocket Though Hoarder is compelling Trying 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 install uv venv replaces python -m venv uv run, uv tool run, and uv tool install replaces pipx uv build - Build your Python package for pypi uv publish - Upload your Python package to pypi, replacing twine and flit publish Extras Brian: Coverage.py originally was just one file Trying out BlueSky brianokken.bsky.social Not because of Taylor Swift, but nice. There are a lot of Python people there. Joke: How programmers sleep

Talk Python To Me - Python conversations for passionate developers
#484: From React to a Django+HTMX based stack

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Nov 5, 2024 57:44 Transcription Available


Have you heard about HTMX? We've discussed it a time or two on this show. We're back with another episode on HTMX, this time with a real-world success story and lessons learned. We have Sheena O'Connell on to tell us how she moved from a React-Django app to pure Django with HTMX. Episode sponsors Posit Bluehost Talk Python Courses Links from the show Sheena O'Connell: sheenaoc.com An HTMX success story essay: sheenaoc.com Sheena's HTMX Workshop: prelude.tech - discount code: talk_python Talk Python's HTMX Courses HTMX + Flask course: training.talkpython.fm HTMX + Django course: training.talkpython.fm Build An Audio AI App course: training.talkpython.fm HTMX: htmx.org Playwright: playwright.dev django-template-partials: github.com Michael's jinja_partials: github.com django-guardian: github.com Talk Python Courses HTMX Example: training.talkpython.fm/courses/all Alpine.js: alpinejs.dev David Guillot SaaS video: youtube.com awesome-htmx: github.com Guild of Educators: guildofeducators.org The big rewrite song: youtube.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Talk Python To Me - Python conversations for passionate developers
#483: Reflex Framework: Frontend, Backend, Pure Python

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Oct 29, 2024 63:05 Transcription Available


Let's say you want to create a web app and you know Python really well. Your first thought might be Flask or Django or even FastAPI? All good choices but there is a lot to get a full web app into production. The framework we'll talk about today, Reflex, allows you to just write Python code and it turns it into a full web app running FastAPI, NextJS, React and more plus it handles the deployment for you. It's a cool idea. Let's talk to Elvis Kahoro and Nikhil Rao from Reflex.dev. Episode sponsors Posit Bluehost Talk Python Courses Links from the show Elvis: github.com Nikhil: github.com Reflex Framework: reflex.dev Reflex source: github.com Reflex docs: reflex.dev Reflex Roadmap: github.com AG Grid: ag-grid.com Warp terminal: warp.dev A Stroll Down Startup Lane episode: talkpython.fm PuePy: Reactive frontend framework in Python episode: talkpython.fm Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Talk Python To Me - Python conversations for passionate developers
#482: Pre-commit Hooks for Python Devs

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Oct 24, 2024 70:20 Transcription Available


Do you struggle to make sure your code is always correct before you check it in? What about your team members' code? That one person who never wants to run the linter? Tired of dealing with tons of conflicts and spurious git changes? You need git pre-commit hooks. We're lucky to have Stefanie Molin on this episode who has done a bunch of writing and teaching of git hooks. Episode sponsors Sentry Error Monitoring, Code TALKPYTHON Bluehost Talk Python Courses Links from the show Stefanie Molin: stefaniemolin.com Talk Python Blog: talkpython.fm/blog How to Set Up Pre-Commit Hooks: stefaniemolin.com Common Pre-Commit Errors and How to Solve Them: stefaniemolin.com A Behind-the-Scenes Look at How Pre-Commit Works: stefaniemolin.com Pre-Commit Hook Creation Guide: stefaniemolin.com (Pre-)Commit to Better Code Workshop: stefaniemolin.com exif-stripper: stefaniemolin.com exif-stripper on GitHub: github.com docstring-validation-using-pre-commit-hook: numpydoc.readthedocs.io Data Morph: Moving Beyond the Datasaurus Dozen: stefaniemolin.com Data Morph on GitHub: github.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy