Python Bytes Podcast Por Michael Kennedy and Calvin Hendryx-Parker capa

Python Bytes

Python Bytes

De: Michael Kennedy and Calvin Hendryx-Parker
Ouça grátis

Python Bytes is a weekly podcast hosted by Michael Kennedy and Calvin Hendryx-Parker. The show is a short discussion on the headlines and noteworthy news in the Python, developer, and data science space.Copyright 2016-2026 Política e Governo
Episódios
  • #497 Faster than light profiling
    Sep 23 2026
    Topics covered in this episode: Tachyon: A sampling profiler ships in Python 3.15's stdlibPython Workers are now generally available on CloudflareFlet 1.0 - build cross-platform apps in Pythonmarimo-book: Build static books from marimo notebooksExtrasJokeWatch on YouTube Sponsored by Logfire from Pydantic: pythonbytes.fm/logfire Connect with the hosts Michael: Mastodon / BlueSky / X / LinkedInCalvin: Mastodon / BlueSky / X / LinkedInShow: Mastodon / BlueSky / X Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am 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: Tachyon: A sampling profiler ships in Python 3.15's stdlib Python 3.15 adds the profiling package per PEP 799: profiling.tracing (where cProfile moved) and profiling.sampling, the new sampler called Tachyonpy-spy and Austin exist but copy raw interpreter bytes with no API, so every CPython release risks breaking them; one in the stdlib is a contract to stop breaking profilersDefaults: 1 kHz, main thread, wall clock, and a -live top-like view for poking at a slow serverOutput is flexible: pstats, -flamegraph, -diff-flamegraph against a baseline, -heatmap on source lines, -opcodes for specialized bytecode, -gecko for Firefox Profiler with GIL and GC markersProfiling modes: wall, cpu, gil (which function is starving my other threads?), and exception, plus -async-aware to see the task graph instead of just select(), -all-threads, and -subprocesses forking a profiler per childNear-zero overhead for production; guidance is 10-30 second windows on representative load, and free-threaded builds divide the rate by thread countAttach to a running PID, same minor version only; ptrace permissions are the main friction. A 3.14 backport already exists on GitHubCaveat: it only sees Python frames, so 90% in calculate() hides NumPy underneath. For native stacks there's Cronon from HRT, 200k samples/sec over DWARF, not yet open source Calvin #2: Python Workers are now generally available on Cloudflare Python Workers are out of beta - now GA, "first-class" language on Cloudflare's Developer PlatformNo more manual JS interop: bindings (queues, R2, D1, Durable Objects) now work natively in Python, e.g. self.env.QUEUE.send({...})Runs on Pyodide (WASM-compiled Python), with real TCP socket support for DB connectivityFrameworks supported: FastAPI, Django, Flask; AI libs like OpenAI SDK, LangChain, MCPUnderlying platform work formalized as PEP 783 (PyEmscripten), after a year of discussionBottom line: write real Python on Cloudflare's edge, no JS glue code required Calvin #3: Flet 1.0 - build cross-platform apps in Python Flet hits 1.0 - build Flutter-backed apps from pure Python, no frontend experience neededOne codebase targets six platforms: iOS, Android, Windows, macOS, Linux, web150+ built-in UI controls, plus support for custom controls / wrapping Flutter packagesMobile now supports real Python packages: NumPy, pandas, Pillow, cryptographyComes with pytest-based UI testing and an MCP integration for AI coding assistantsMilestone lands 4+ years after its first PyPI release (Sept 2022) - signals "production ready," not experimental Michael #4: marimo-book: Build static books from marimo notebooks marimo-book is a Jupyter-Book-style static site generator built specifically for marimo .py notebooks. It ships polished multi-page sites with Material for MkDocs theming, full-text search, dark mode, and code copy, plus a content-hashed incremental build cache that drops rebuilds from 100+ seconds to roughly 3 seconds on real books. Standout extras include anywidget rendering without a kernel, static reactivity for discrete sliders via pre-rendered lookup tables, an opt-in WASM/Pyodide mode per chapter, and per-chapter launch buttons. If you've wanted to publish a marimo notebook as a real book or course site without hosting a kernel, marimo-book gives you the static, searchable, fast-loading output you'd expect from Jupyter Book.Alpha (0.1.x), but in production: pin marimo-book>=0.1.5,<0.2; the book.yml schema is stable for v0.1, and dartbrains.org is a real-world user.Two-stage build by design: a marimo-aware preprocessor emits plain Markdown + inline HTML, then mkdocs (Material today, zensical tomorrow) renders it. Not a mkdocs plugin, so the shell stays swappable.Interactive widgets without a kernel: anywidget Canvas/Three.js/Plotly mounts render statically, and mo.ui.slider with explicit steps gets pre-computed as a static lookup table.WASM escape hatch per chapter: set mode: wasm and the chapter routes through marimo's MarimoIslandGenerator, shipping the marimo runtime + Pyodide bundle for full reactivity where you need it.Per-chapter launch buttons and extras: readers can jump to molab, GitHub, or a downloaded .py; optional [social], [...
    Exibir mais Exibir menos
    27 minutos
  • #496 A lake house in Seattle
    Sep 15 2026
    Topics covered in this episode: Pandas Should Go ExtinctPydantic-pint puts real-world units in your Pydantic modelsHow Libraries Run Rust Inside Python (With PyO3)AWS acquires DuckLabsExtrasJokeWatch on YouTube Sponsored by Logfire from Pydantic: pythonbytes.fm/logfire Connect with the hosts Michael: Mastodon / BlueSky / X / LinkedInCalvin: Mastodon / BlueSky / X / LinkedInShow: Mastodon / BlueSky / X Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too. Finally, if you want an artisanal 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. Calvin #1: Pandas Should Go Extinct Pandas' slowness pushes teams toward "Big Data" tools (Spark, Databricks) they don't actually need — most workloads never hit true Big Data scaleAmazon Redshift telemetry: ~95% of tables are under 100GB, ~87% of queries touch 80GB or less — that's "Medium Data," not Big DataPolars and DuckDB fill that gap: single-machine, fast, no cluster required1 Billion Row Challenge benchmark: Pandas took 4m28s vs. Polars 5.04s and DuckDB 5.19s — DuckDB also used 19x less memoryOn a real-world NYC taxi dataset (3GB parquet), pure DuckDB ran 2x faster than pure Pandas while using a fraction of the RAMBonus: Apache Arrow lets you pass data between Pandas/Polars/DuckDB with zero copying, so trying them out doesn't mean a full rewrite Michael #2: Pydantic-pint puts real-world units in your Pydantic models Pydantic-pint bridges Pydantic and Pint so models can validate physical quantities like 4m or 12 meters instead of bare floats. Fields annotated with PydanticPintQuantity parse user input, convert between compatible units, and serialize quantities back out as strings. That closes a real gap for anything consuming API payloads, config files, or sensor data with measurements, letting you enforce units at the validation boundary instead of hoping every caller remembered them. via PyCoder's Weekly newsletterUnit mix-ups have literally crashed spacecraft; now your Pydantic models can refuse them at the door.Annotate a field as Annotated[Quantity, PydanticPintQuantity('km')] and inputs like 12 meters arrive auto-converted to kilometersValidation covers string, numeric, and quantity inputs, and model_dump_json serializes quantities as readable unit stringsInstallable from PyPI as pydantic-pint, MIT licensed, with docs at pydantic-pint.readthedocs.ioEarly-stage solo project at version 0.4, so API stability and maintenance are open questions worth discussing Calvin #3: How Libraries Run Rust Inside Python (With PyO3) Pydantic v2's validation core (pydantic-core) is Rust under the hood, built with PyO3 — this post shows how that bridge actually works via a small hand-built JSON parserFour steps to get Rust into Python: write a normal Rust module, annotate with PyO3 macros (#[pyfunction], #[pymodule]), compile/install with maturin, then just import itThe parser builds a Rust tree first — Python never touches it until the boundary crossingKey insight: converting the Rust result into Python objects (.into_pyobject) is often the expensive part, not the parsing — 100,000 JSON values means ~100,000 Python objects built after parsing's already doneErrors cross the boundary too: Rust's typed errors convert into real Python exceptions (ValueError, FileNotFoundError) via From/?, so callers get clean Python semanticsTakeaway for anyone porting Rust in: if you're returning a scalar, don't sweat it; if you're returning a big structure, profile the boundary — that's the real cost, not the algorithm Michael #4: AWS acquires DuckLabs Thank you Dylan McConnell. What does this mean for the DuckDB ecosystem? DuckDB is the open-source in-process analytical SQL engine. MIT licensed. The IP is not owned by any company - it's held by the nonprofit DuckDB Foundation, which was created when the team spun out of CWI Amsterdam. Peter Boncz, the CWI representative on the Foundation board, describes it as the entity that holds all IP of open-source DuckDB. DuckLabs (ducklabs.com) is the company, formerly branded DuckDB Labs. Founded a little over five years ago by Hannes Mühleisen and Mark Raasveldt to give the DuckDB team a stable long-term home, bootstrapped deliberately instead of taking VC, grown to 30+ people in Amsterdam, funded by support and feature-prioritization contracts. It employs the core devs. It does not own DuckDB. DuckLake is one of three projects DuckLabs builds, what they call the Duck Stack: DuckDB, DuckLake, and Quack. DuckLake is the lakehouse format that puts catalog metadata in a SQL database instead of in files on object storage. Quack is newer - an RPC-style protocol that turns DuckDB into a client-server system where both ends are DuckDB instances, slated to stabilize in DuckDB v2.0 in September 2026. MotherDuck is a separate Seattle company, Jordan Tigani's, selling serverless ...
    Exibir mais Exibir menos
    33 minutos
  • #495 Banned
    Sep 8 2026
    Topics covered in this episode: EuroPython 2026 videos are onlineThe State of Django 2026: Boring is so backhtmx 4.0.0 has been released🐍 Functionally ZenExtrasJokeWatch on YouTube Sponsored by us! Support our work through: Our courses at Talk PythonConsulting from Six Feet Up Connect with the hosts Michael: Mastodon / BlueSky / X / LinkedInCalvin: Mastodon / BlueSky / X / LinkedInShow: Mastodon / BlueSky / X Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too. Finally, if you want an artisanal 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: EuroPython 2026 videos are online The EuroPython Society has published all 117 recordings from EuroPython 2026 on the official EuroPython Conference YouTube channel. The conference ran July 13-19 in Krakow, Poland and celebrated the conference series' 25th anniversary. The playlist covers keynotes, panels, lightning talks, and full talk recordings across Python core, web, DevOps, data/ML, embedded, and other tracks. If you missed EuroPython 2026 in Krakow, this is the complete free on-demand archive of one of the year's biggest European Python events.117 videos now live on the EuroPython Conference YouTube channel, last updated Aug 17, 2026.Michael’s personal watch list. Calvin #2: The State of Django 2026: Boring is so back State of Django 2026 (JetBrains/DSF survey, ~3,500 devs, 40+ countries) - "boring is so back": Django's core stays reliable while everything around it moves fastCore is stable: Postgres 76–79% for 5 years running, templates ~80%, 43% already on Django 6.0AI is routine now (only 10% use none) but workflow's unsettled - Claude Code leads at 35%, and 56% still just use it for chat, not autonomous editsTooling is consolidating: uv and Ruff both at 43% adoption, each replacing several older single-purpose toolsType hints are winning (57% use them) but the checker is up for grabs - IDE-built-in leads at 40%, Mypy 32%, with ty/Pyrefly emergingTwo Django communities coexist happily: 72% server-rendered templates vs. 53% API-only - and htmx adoption jumped from 5% to 34% in five years Michael #3: htmx 4.0.0 has been released After 8 months of work, the htmx team shipped 4.0.0, a rewrite that moves internals from XMLHttpRequest to fetch() while keeping the API almost identical to htmx 2. Three changes may need action: attribute inheritance is now explicit via an :inherited suffix, event names follow a htmx:phase:action pattern, and history no longer caches pages in localStorage. Additions include built-in morph swaps, the new hx-partial tag, and many core extensions. htmx 2 stays supported and remains latest on npm until early 2027. htmx is the go-to frontend layer for Python server-rendered apps (Flask, Django, FastAPI), and 4.0 is deliberately low-drama: nearly behavior-compatible, so teams can upgrade on their own schedule and pick up morph swaps and streaming extensions.Explicit inheritance is the biggest migration item: hx-confirm, hx-headers, hx-target and friends no longer cascade to children unless you append :inherited; hx-disinherit and hx-inherit are goneA CLI upgrade checker (npx htmx.org@4.0.0 upgrade-check) flags spots needing :inherited, renames like hx-disable to hx-ignore, removed attrs like hx-vars, and old event names in templates and JSEvents follow htmx:phase:action (htmx:beforeRequest becomes htmx:before:request); most error events collapse into htmx:error and htmx:xhr:* events are removed with XMLHttpRequestHistory no longer snapshots pages in localStorage; back navigation re-fetches and swaps into the body, fixing a chronic support headache, with a new hx-history-cache extension for sessionStorage cachingNew features: out-of-the-box morphing swaps, the [HTML_REMOVED] tag for multi-element updates, streaming over SSE/WebSockets/multipart, and hx-live, their Alpine-inspired DOM scripting solutionNo forced upgrade: 2.x stays latest on npm until early 2027 (4.0 remains next) and is supported indefinitely; the team even ships official LLM skill files for guidance and upgrading Calvin #4: 🐍 Functionally Zen Functionally Zen (Kyle Adams, Test Double) - riffs on "simple is better than complex" with 7 extra tenets for Python simplicityCore claims: idiomatic > non-idiomatic, data > functions, pure functions > impure functions > classesFavorite example: a medical-dosage calculator replaced with a plain lookup dict - no logic, no tests neededBig idea: keep a thin "impure shell" around a "pure core" (Gary Bernhardt's functional core / imperative shell) - push side effects (API calls, DB, files) to the edgesSide note: constructors that do I/O are "poison pills" - the side effect infects every class that depends on themPayoff: pure functions and no-mock tests are just easier to read and reason about than the alternative Extras Calvin: uv ships ...
    Exibir mais Exibir menos
    28 minutos
adbl_web_anon_alc_button_suppression_t1
Ainda não há avaliações