Episodes

  • Topics covered in this episode:
    šŸ¤– On Robots.txtniquestsEvery dunder method in PythonLockboxExtrasJokeWatch on YouTube

    About the show

    Sponsored by ScoutAPM: pythonbytes.fm/scout

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Brian #1: šŸ¤– On Robots.txt

    Jeff Triplettā€œIn theory, this file helps control what search engines and AI scrapers are allowed to visit, but I need more confidence in its effectiveness in the post-AI apocalyptic world.ā€Resources to get startedBlock the Bots that Feed ā€œAIā€ Models by Scraping Your WebsiteGo ahead and block AI web crawlersDark VisitorsDjangoAdd robots.txt to a Django websiteHow to add a robots.txt to your Django siteHugoHugo robots.txtPodcast questions:Should content creators block AI from our work?Shouldā€™t we set up a standard way to do this?I still havenā€™t found a way to block GitHub repositories. Is there a way?Licensing is one thing (not easy), but I donā€™t think any bots respect any protocol for repos.

    Michael #2: niquests

    Requests but with HTTP/3, HTTP/2, Multiplexed Connections, System CAs, Certificate Revocation, DNS over HTTPS / TLS / QUIC or UDP, Async, DNSSEC, and (much) pain removed!Niquests is a simple, yet elegant, HTTP library. It is a drop-in replacement for Requests, which is under feature freeze.See why you should switch: Read about 10 reasons why

    Brian #3: Every dunder method in Python

    Trey HunnerSure, thereā€™s __repr__(), __str__(), and __init__(), but how about dunder methods for:Equality and hashabilityOrderabilityType conversions and formattingContext managersContainers and collectionsCallabilityArithmetic operatorsā€¦ and so much more ā€¦ even a cheat sheet.

    Michael #4: Lockbox

    Lockbox is a forward proxy for making third party API calls.Why? Automation or workflow platforms like Zapier and IFTTT allow "webhook" actions for interacting with third party APIs.They require you to provide your third party API keys so they can act on your behalf. You are trusting them to keep your API keys safe, and that they do not misuse them.How Lockbox helps: When a workflow platform needs to make a third party API call on your behalf, it makes a Lockbox API call instead. Lockbox makes the call to the third party API, and returns the result to the workflow platform.

    Extras

    Brian:

    Django: Join the community on Mastodon - Adam JohnsonNo maintenance intended - Sent in from Kim van Wyk

    Michael:

    US sues AppleGood video on pluses and minusesThe hot water just the day before [and this one]https://9to5mac.com/2024/03/25/app-store-proposals-rejected/ PyPI Support Specialist jobVS Code AMA, please submit your question here PyData Eindhoven 2024 has a date and open CFP

    Joke: Windows Certified

  • Topics covered in this episode:
    pycountryDoes Python have pointers?ingestrMake your terminal niceExtrasJokeWatch on YouTube

    About the show

    Sponsored by ScoutAPM: pythonbytes.fm/scout

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Michael #1: pycountry

    A Python library to access ISO country, subdivision, language, currency and script definitions and their translations.pycountry provides the ISO databases for the standards:639-3 Languages3166 Codes for representation of names of countries and their subdivisions3166-1 Countries3166-3 Deleted countries3166-2 Subdivisions of countries4217 Currencies15924 Scripts

    Brian #2: Does Python have pointers?

    Ned BatchelderTurns out, this is really the description of ā€œwhatā€™s a variable in Python?ā€ that helps to make sense of the ā€œvariables as namesā€ model in Python, especially for people coming from languages that use pointers a lot.You can use id() to find out what a variable points toYou just canā€™t do the reverse of access it given an id.Thereā€™s no ā€œdereferenceā€ operator.See also Python Names and Values, also by NedShould be required reading/viewing for all Python curriculum.

    Michael #3: ingestr

    ingestr is a command-line application that allows ingesting or copying data from any source into any destination database.Works on both MongoDB and Postgres and many more. incremental loading: append, merge or delete+insert

    Brian #4: Make your terminal nice

    David LordDavidā€™s switched to Fish and StarshipI tried switching to Fish several times, and I guess Iā€™m good with zsh.Although I admire the brave comic sans motto: ā€œFinally, a command line shell for the 90sā€But Iā€™m finally ready for Starship, and it takes almost no time to set upPlus itā€™s fast. (Has it always been Rust?)

    Extras

    Brian:

    Doing some groundwork for a SaaS project, using SaaS PegasusI just talked with Cory from Pegasus for an upcoming PythonTest episodeI havenā€™t decided whether to save up SaaS episodes for one big series, or spread them out.But mostly Iā€™m excited to get my project started.

    Michael:

    Excellent video about ā€œcloud exitā€uv - The Next Evolution in Python Packages?Python 3.13 a5Targetā€™s Open Source Fund via Pat Decker

    Joke: Anti-social engineer

  • Episodes manquant?

    Cliquez ici pour raffraichir la page manuellement.

  • Topics covered in this episode:
    6 ways to improve the architecture of your Python project (using import-linter)MountaineerWhy Python's Integer Division FloorsHatchetExtrasJokeWatch on YouTube

    About the show

    Sponsored by ScoutAPM: pythonbytes.fm/scout

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Brian #1: 6 ways to improve the architecture of your Python project (using import-linter)

    PigleiUsing import-linter to define architectural layerscheck to make sure imports donā€™t violate (import from upper layers)can also check for more contracts, such as forbidden - disallow a specific from/to import independence - list of modules that shouldnā€™t import from each otherFixing violationsa process introduced to set exceptions for each violation in a config filethen fix violations 1 at a time (nice approach)use the whole team if you canCommon methods for fixing dependency issuesMerging and splitting modulesDependency Injection, including using protocols to keep type hints without the need to import just for typesUse simpler dependency typesDelaying function implementationsmodule global methods set by caller, or adding a simple plugin/callback systemConfiguration drivenSetting import statements in a config file and using import_string() at runtimeReplace function calls with event-driven approaches

    Michael #2: Mountaineer

    Mountaineer is a batteries-included web framework for Python and React.Mountaineer focuses on developer productivity above all else, with production speed a close second.šŸ“ Typehints up and down the stack: frontend, backend, and databasešŸŽ™ļø Trivially easy client[HTML_REMOVED]server communication, data binding, and function callingšŸŒŽ Optimized server rendering for better accessibility and SEOšŸ¹ Static analysis of web pages for strong validation: link validity, data access, etc.šŸ¤© Skip the API or Node.js server just to serve frontend clients

    Brian #3: Why Python's Integer Division Floors

    Guido van RossumInteger division always floors (toward negative infinity) instead of truncating. (C truncates)5//2 ā†’ 2-5//2 ā†’ -35//-2 ā†’ -3Reason, For nice mathematical relationships with // and % (modulo).a//b = quotient (q), a%b = remainder (r)such that b*q + r = a, and 0 <= r < b This works for both positive and negative a valuesFor negative b, the second rule has to change to 0 >= r > b If you truncate (like C does), you have to use abs(r) for the first rule to work.Theory of why C doesnā€™t do it this way: Probably a hardware limitation at the time when C was designed, due to ā€œsign + magnitudeā€ integers instead of modern twoā€™s compliment integers.

    Michael #4: Hatchet

    Hatchet is a distributed, fault-tolerant task queue which replaces traditional message brokers and pub/sub systems. Itā€™s built to solve problems like concurrency, fairness, and durabilityConcurrency, Fairness, and Rate limiting: Enable FIFO, LIFO, Round Robin, and Priority Queues with built-in strategies to avoid common pitfalls.Architected for Resiliency: Customizable retry policies and built-in error handling to recover from transient failures.

    Extras

    Brian:

    Charlie Marsh on uv in PythonTest episode 216

    Michael:

    Build An Audio AI App Course [free!]Rock Solid Python with Python Typing CourseCoolio

    Joke: Breaking Prod

  • Topics covered in this episode:
    zoxideSmart CLIs with TyperPython recommended officially by the US GovernmentTextual tutorials at Mouse vs PythonExtrasJokeWatch on YouTube

    About the show

    Sponsored by ScoutAPM: pythonbytes.fm/scout

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Michael #1: zoxide

    zoxide is a smarter cd command, inspired by z and autojump.It remembers which directories you use most frequently, so you can "jump" to them in just a few keystrokes.zoxide works on all major shells and platforms.

    Brian #2: Smart CLIs with Typer

    Rahul PaiLots of TILs here, even though Iā€™ve been using Typer for years.Examples ofAuto-detection of arguments and types based on type hintsHelp text is a smidge clunkierPrompting for missing arguments Defaulting to an enviromental variable for missing argsPrint help if no args givenExplicit app and subcommands with a comparison to argparseReusable commands with result_callback Several topics covered in comparison with argparseSee also Testing argparse Applications

    Michael #3: Python recommended officially by the US Government

    The US government explicitly recommends memory safe languages.Python is one of themThe comparison to big tech by Samuel is interesting

    Brian #4: Textual tutorials at Mouse vs Python

    Mike DriscollMost recently Creating a Modal Dialog For Your TUIs in TextualTextualize already has some pretty great documentation at textual.textualize.ioBut itā€™s cool to see some different tutorials on it.

    Extras

    Brian:

    Is UV the FUTURE of Python PACKAGING? šŸšŸ“¦ - HynekNice context on how uv fits into all of the existing packaging challenges and some hope for the future.venmo feed is public by default

    Michael:

    ngrok Python SDKDjangonauts on Talk PythonMaybe just a new case and battery for your phone?

    Joke: Ship it!

  • Topics covered in this episode:
    uv: Python packaging in RustjptermEverything You Can Do with Python's textwrap ModuleHTML FirstExtrasJokeWatch on YouTube

    About the show

    Sponsored by ScoutAPM: pythonbytes.fm/scout

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    First, we are likely skipping next week folks. Iā€™ll be at PyCon Philippines.

    Brian #1: uv: Python packaging in Rust

    Suggested by Collin Sullivanā€œuv is designed as a drop-in replacement for pip and pip-toolsā€Intended to support the pip and pip-tools APIs, just use uv pip instead.Oh yeah, also replaces venv and virtualenv.And itā€™s super zippy, as you would expect.Iā€™m still getting used to ituv pip venv didnā€™t have --prompt at first. But thatā€™s fixed. should get released soon.first thing I trieduv pip install ./ and uv pip install pytest second. worked awesomeuv pip list third thing I triednot there either, but uv pip freeze is similar.Issue already filedSeriously, Iā€™m excited about this. Itā€™s just that it seems I wasnā€™t the target workflow for this.See alsotox-uv - speed up tox with uv[rye](https://lucumr.pocoo.org/2024/2/15/rye-grows-with-uv/) from Armin Ronacher, will be supported by Astral- MK: Switched to this for dev. Itā€™s excellent.For some reason, doesnā€™t work on Docker?From Henry

    Michael #2: jpterm

    via David Brochartjpterm is a JupyterLab-like environment running in the terminal. What sets jpterm apart is that it builds on the shoulders of giants, one of which is Textual.It is designed similarly to JupyterLab, where everything is a plugin.

    Brian #3: Everything You Can Do with Python's textwrap Module

    Martin HeinzNice quick demo of one of my favorite builtin modules.Featuresshorten text and insert placeholderswrap can split lines to the same lengthbut can also just split a string into equal chunks for batch processingTextWrapper class does all sorts of fancy stuff.dedent is my fave. Awesome for including a multiline string in a test function as an expected outcome.

    Michael #4: HTML First

    HTML First is a set of guidelines for making it easier, faster and more maintainable to build web softwarePrinciplesLeveraging the default capabilities of modern web browsers.Leveraging the extreme simplicity of HTML's attribute syntax.Leveraging the web's ViewSource affordance.PracticesPrefer Vanilla approachesUse HTML attributes for styling and behaviourUse libraries that leverage HTML attributesAvoid Build StepsPrefer Naked HTMLBe View-Source Friendly

    Extras

    Brian:

    pytest 8.0.1 released. Fixes the parametrization order reversal I mentioned a couple episodes ago, plus some other fixes. Learn about dependency injection from HynekIf you want to jump into some Rust to help speed up Python tools, maybe check out yarr.fyiI just interviewed Nicole, the creator, for Python Test, and this looks pretty coolHer episode should come out in a couple of weeks.Ramping up more interviews for Python People. So please let me know if youā€™d like to be on the show or if you have suggestions for people youā€™d like me to interview.Also, I know this is weird, some people are still on X, and not like ā€œdidnā€™t close their account when they leftā€, but actually still using it. This is ironically a reverse of X-Files. ā€œI donā€™t want to believeā€. However, Iā€™ve left my account open for those folks. I check it like twice a month. But eventually Iā€™ll see it if you DM me. But really, there are easier ways to reach me.

    Michael:

    PyData Pittsburg CFPWyden: Data Broker Used Abortion Clinic Visitor Location Data To Help Send Targeted Misinformation To Vulnerable WomenSciPy 2024 - Call for Proposals

    Joke: Yeti tumbler

  • Topics covered in this episode:
    AppleCrateOne way to package Python code right nowFlask8 but why?Extra, Extra, ExtraExtrasJokeWatch on YouTube

    About the show

    Sponsored by ScoutAPM: pythonbytes.fm/scout

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Michael #1: AppleCrate

    By Rhet Turnbull (from Building macOS Apps episode)AppleCrate is a tool for creating native macOS installers for your command line tools. It's useful for creating installers for command line tools written in any language. Tools written in interpreted languages like Python will need to be first processed with a tool like pyinstaller to create a standalone executable.AppleCrate uses Jinja2 templates to generate the files required for the installer. This allows you to use template variables in your files or command line parameters to customize the installer.

    Brian #2: One way to package Python code right now

    Ned BatchelderAn example repo with all the parts for packageA lot of discussion and what to think about in the README (unfortunately rst and not md, but we canā€™t have everything)Includespyproject.tomldev-requirements.txtREADME.rstMakefileLICENSE.txt.bitignore.editorconfigsee https://editorconfig.orgShout out to to Packaging Python Projects on python.org, which is pretty good

    Michael #3: Flask8 but why?

    Ihor Kalnytskyi: Something I really like about #ruff, a new tool for both linting and formatting in the #python ecosystem. You can literally pick any lint rule it supports and see both reasoning and examples.Ruff supports over 700 lint rules, many of which are inspired by popular tools like Flake8, isort, pyupgrade, and others.

    Brian #4: Extra, Extra, Extra

    Flat.app kinda like trello, etc. but a very simple interface that makes it pretty easy to usetosdr.orgTerms of Service; Didnā€™t ReadKind of a wikipeda way to summarize the terms of service of different web services, and give them ratings/gradesWhy I writeI talked about blogging more last episode. Hereā€™s a cool write-up by Sheena O'Connellreasonsto rememberto refine my thinkingto impactto get through hard timesto connectThree pytest Features You Will LoveHelen Scott at JetBrains/PyCharmFixtures, Markers, ParametrizePlus shoutouts to my course and book

    Extras

    Brian:

    Wikipedia List of common misconceptions - just for funEar Trumpet Labs (a Potland Company) Edwina mic - just something on my wish list

    Michael

    Mozilla MonitorPython 3.12.2Upgraded all the Python apps (11 of them) in about 2 minutes and one commandGot a Vision Pro? Try the Talk Python Courses appGreat video event: Data Doodling with Martina Pugliese

    Joke: Free Tier

  • Topics covered in this episode:
    DokkuSummary of Major Changes Between Python VersionsHow to check Internet Speed via Terminal? speedtest-cliBlogs: We all should blog moreExtrasJokeWatch on YouTube

    About the show

    Sponsored by us! Support our work through:

    Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Michael #1: Dokku

    An open source PAAS alternative to Heroku.Dokku helps you build and manage the lifecycle of applications from building to scaling.Powered by Docker, you can install Dokku on any hardware.Once it's set up on a host, you can push Heroku-compatible applications to it via Git. Rich plug in architecture.

    Brian #2: Summary of Major Changes Between Python Versions

    Nicholas HairsChanges between versions & Tools & utilities to help with switchingHopefully youā€™re already at least at 3.8, but come on, 3.11 & 3.12 are so fun!Useful thingspyupgrade can automatically upgrade code base(However, I frequently just upgrade and run tests and let my old code be as-is until it bugs me. - Brian)black checks pyproject.toml requires-python setting and uses version specific rules.Versions (way more highlights listed in the article)3.8 Assignment expressions := walrusf"{variable=}" now works3.9 Typing has built in generics like dict[], so no more from typing import DictDict union operatorStrings can removeprefix and removesuffix3.10Structural pattern matching match/caseTyping: Union using pipe |Dataclasses support slots=True and kw_only=True3.11tomllib included as a standard TOMP parserException groupsException Notes add_note()Typing: A Self typeStar unpacking expressions allowed in for statements: for x in *a, *b:3.12f-strings can re-use quotesTyping: better type parameter syntaxTyping: @override decorator ensures a method being overridden by a child class actually exists.

    Michael #3: How to check Internet Speed via Terminal? speedtest-cli

    Command line interface for testing internet bandwidth using speedtest.netJust pipx install speedtest-cliHas a Python API too

    Brian #4: Blogs: We all should blog more

    Jeff Triplett is attempting one post per day in FebruaryFeb 1: Choosing the Right Python and Django Versions for Your ProjectsFeb 2: My First MacWhich also links to a quite interesting Personal: Default Apps 2023Feb 3: Whatā€™s Your Go-to Comfort Media? [rough cut]Feb 4: The Django apps I actually use (rough cut)Feb 5: How to test with Django and pytest fixturesNeed ideas? Check out Build an idea bank and never run out of blog ideasNot using AI? Thanks. We appreciate that.Maybe tag it as Not By AI

    Extras

    Brian:

    If upgrading to pytest 8, be aware that running individual tests with parametrization will result in a reverse order. It shouldnā€™t matter. You shouldnā€™t be depending on test order.But it was surprising to me.Issue has been logged

    Michael:

    Orbstack follow up

    Joke: White Lies

  • Topics covered in this episode:
    Granianpytest 8 is hereAssorted Docker GoodiesNew GitHub Copilot Research Finds 'Downward Pressure on Code Quality'ExtrasJokeWatch on YouTube

    About the show

    Sponsored by us! Support our work through:

    Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Michael #1: Granian

    via Andy Shapiro and Bill CrookA Rust HTTP server for Python applications.Granian design goals are:Have a single, correct HTTP implementation, supporting versions 1, 2 (and eventually 3)Provide a single package for several platformsAvoid the usual Gunicorn + uvicorn + http-tools dependency composition on unix systemsProvide stable performance when compared to existing alternativesCould use better loggingBut making my own taught me maybe I prefer that!Originates from the Emmett framework.

    Brian #2: pytest 8 is here

    Improved diffs:Very verbose -vv is a colored diff, instead of a big chunk of red.Python code in error reports is now syntax-highlighted as Python.The sections in the error reports are now better separated.Diff for standard library container types are improved.Added more comprehensive set assertion rewrites for comparisons other than equality ==, with the following operations now providing better failure messages: !=, <=, >=, <, and >.Improvements to -r for xfailures and xpassesReport tracebacks for xfailures when -rx is set.Report captured output for xpasses when -rX is set.For xpasses, add - in summary between test name and reason, to match how xfail is displayed.This one was important to me. Massively helps when checking/debugging xfail/xpass outcomes in CI. Thanks to Fabian Sturm, Bruno Oliviera, and Ran Benita for help to get this release.Lots of other improvementsSee full changelog for all the juicy details. And then upgrade and try it out! pip install -U pytest

    Michael #3: Assorted Docker Goodies

    OrbStackSay goodbye to slow, clunky containers and VMsOrbStack is the fast, light, and easy way to run Docker containers and Linux. Develop at lightspeed with our Docker Desktop alternative.PodmanPodman is an open source container, pod, and container image management engine. Podman makes it easy to find, run, build, and share containers.Manage containers (not just Podman.)Podman Desktop allows you to list, view, and manage containers from multiple supported container engines* in a single unified view.Gain easy access to a shell inside the container, logs, and basic controls.Works on Podman, Docker, Lima, kind, Red Hat OpenShift, Red Hat OpenShift Developer Sandbox.CasaOSYour Personal Cloud OS.Community-based open source software focused on delivering simple personal cloud experience around Docker ecosystem.Also have the ZimaCube hardware (Personal cloud. Re-invented.)

    Brian #4: New GitHub Copilot Research Finds 'Downward Pressure on Code Quality'

    David RamelRegarding ā€œā€¦the quality and maintainability of AI-assisted code compared to what would have been written by a human.ā€Q: "Is it more similar to the careful, refined contributions of a Senior Developer, or more akin to the disjointed work of a short-term contractor?"A: "We find disconcerting trends for maintainability. Code churn -- the percentage of lines that are reverted or updated less than two weeks after being authored -- is projected to double in 2024 compared to its 2021, pre-AI baseline. We further find that the percentage of 'added code' and 'copy/pasted code' is increasing in proportion to 'updated,' 'deleted,' and 'moved 'code. In this regard, AI-generated code resembles an itinerant contributor, prone to violate the DRY-ness [don't repeat yourself] of the repos visited."

    Extras

    Brian:

    Did I mention pytest 8? Just pip install -U pytest todayAnd if you want to learn pytest super fast, check out The Complete pytest Course or grab a copy of the book, Python Testing with pytest

    Michael:

    Iā€™d like to encourage people to join our mailing list. We have some fun plans and some of them involve our newsletter. Itā€™s super private, no third parties, no spam and is based on my recent Docker and Listmonk work.Big release for Pydantic, 2.6.New essay: Use Custom Search Engines Way More

    Joke:

    Pushing to mainJunior vs Senior engineer
  • Topics covered in this episode:
    Syntax Error #11: Debugging Pythonumami and umami-analyticspytest-suite-timeoutListmonk and (py) listmonkExtrasJokeWatch on YouTube

    About the show

    Sponsored by us! Support our work through:

    Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Brian #1: Syntax Error #11: Debugging Python

    JuhisIssue 11 of a fun debugging newsletter from JuhisDebugging advicemindesettake a breakadopt a processtalk to a ducktools & techniquesprintsnoopdebuggersDjango debug toolbar & Kolo for VS Code

    Michael #2: umami and umami-analytics

    Umami makes it easy to collect, analyze, and understand your web data ā€” while maintaining visitor privacy and data ownership.umami-analytics is a client for privacy-preserving, open source Umami analytics platform based on httpx and pydantic.Core featuresāž• Add a custom event to your Umami analytics dashboard.šŸŒ List all websites with details that you have registered at Umami.šŸ”€ Both sync and async programming models.āš’ļø Structured data with Pydantic models for API responses.šŸ‘©ā€šŸ’» Login / authenticate for either a self-hosted or SaaS hosted instance of Umami.šŸ„‡Set a default website for a simplified API going forward.

    Brian #3: pytest-suite-timeout

    While recording Python Test 213 : Repeating TestsI noted that pytest-repeat doesnā€™t have a timeout, but pytest-flakefinder does.And perhaps I should add a timeout to pytest-repeatBut also, maybe thereā€™s other places Iā€™d like a timeout, not just with repeat, but often with other parametrizations and even parametrize matrices. So, pytest-suite-timeout is bornBut Why not pytest-timeout? asks Mike Feldertimeout is only timeouts per test, and it isnā€™t always gracefulsuite-timeout is for the full suite, and only times out between tests.so, you could use both

    Michael #4: Listmonk and (py) listmonk

    ListmonkSelf-hosted newsletter and mailing list manager (think mailchimp)Built on Go and VueBacked by a company charing for this service as SaaSStill requires a mail infrastructure backend (Iā€™m using Sendgrid)listmonk (on PyPI)API Client for PythonCreated by Yours TrulyI tried 4 other options first, they were all bad in their own way.Features:āž•Add a subscriber to your subscribed users.šŸ™Ž Get subscriber details by email, ID, UUID, and more.šŸ“ Modify subscriber details (including custom attribute collection).šŸ” Search your users based on app and custom attributes.šŸ„ Check the health and connectivity of your instance.šŸ‘„ Retrieve your segmentation lists, list details, and subscribers.šŸ™… Unsubscribe and block users who don't want to be contacted further.šŸ’„ Completely delete a subscriber from your instance.šŸ“§ Send transactional email with template data (e.g. password reset emails).These pair well in my new docker cluster infrastructureCalls to the API from a client app (e.g. Talk Python Training) are basically loopback on the local docker bridge network.

    Extras

    Michael:

    Every github repo that has ā€œreleasesā€ has a releases RSS feed, e.g. UmamiKolo Django + VS CodeWarp Terminal on linuxbpytop and btop - live server monitoring

    Joke: The cloud, visualized

  • Topics covered in this episode:
    Leaving the cloudPEP 723 - Inline script metadataFlet for Androidharlequin: The SQL IDE for Your Terminal.ExtrasJokeWatch on YouTube

    About the show

    Sponsored by Bright Data : pythonbytes.fm/brightdata

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Michael #1: Leaving the cloud

    Also see Five values guiding our cloud exitWe value independence above all else.We serve the internet. We spend our money wisely. We lead the way. We seek adventure.And We stand to save $7m over five years from our cloud exitSlice our new monster 192-thread Dell R7625s into isolated VMsWhich added a combined 4,000 vCPUs with 7,680 GB of RAM and 384TB of NVMe storage to our server capacityThey created Kamal ā€” Deploy web apps anywhereA lot of these ideas have changed how I run the infrastructure at Talk Python and for Python Bytes.

    Brian #2: PEP 723 - Inline script metadata

    Author: Ofek LevThis PEP specifies a metadata format that can be embedded in single-file Python scripts to assist launchers, IDEs and other external tools which may need to interact with such scripts.Example: # /// script # requires-python = ">=3.11" # dependencies = [ # "requests&lt;3", # "rich", # ] # /// import requests from rich.pretty import pprint resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10])

    Michael #3: Flet for Android

    via BalĆ”zsRemember Flet?Hereā€™s a code sample (scroll down a bit).Itā€™s amazing but has been basically impossible to deploy. Now we have Android.Hereā€™s a good YouTube video showing the build process for APKs.

    Brian #4: harlequin: The SQL IDE for Your Terminal.

    Ted Conbeer & other contributorsWorks with DuckDB and SQLiteSpeaking of SQLiteJeff Triplett and warnings of using Docker and SQLite in productionAnžeā€™s postand and article: Django, SQLite, and the Database is Locked Error

    Extras

    Brian:

    Recent Python People episodesWill VincentJulian SequeiraPamela Fox

    Michael:

    PageFind and how Iā€™m using itWhen "Everything" Becomes Too Much: The npm Package Chaos of 2024Essay: Unsolicited Advice for Mozilla and FirefoxSciPy 2024 is coming to Washington

    Joke: Careful with that bike lock combination code

  • Topics covered in this episode:
    Python 3.13 gets a JITUniDep - Unified Conda and Pip Dependency ManagementDonā€™t Start Pull Requests from Your Main Branchinstld: The simplest package managementExtrasJokeWatch on YouTube

    About the show

    Sponsored by us! Support our work through:

    Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters

    Connect with the hosts

    Michael: @[email protected]: @[email protected]: @[email protected]

    Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

    Brian #1: Python 3.13 gets a JIT

    Anthony ShawGreat article that walks through JIT concepts with a small example as if you were writing a parser in Python instead of C.CoversWhat is a JIT?What is a copy-and-patch JIT? and Why?How does the Python JIT work?Is it faster?This is a building block to future improvements

    Michael #2: UniDep - Unified Conda and Pip Dependency Management

    šŸ”„ Single requirements.yaml for both #Conda & #Pip.āš™ļø Works with pyproject.toml & setup.py.šŸ¢ Perfect for monorepos.šŸ”’ Create consistent conda-lock files for multiple projects.šŸŒ Platform-specific support.šŸš€ unidep install for easy setup.Full source page.

    Brian #3: Donā€™t Start Pull Requests from Your Main Branch

    Hynek SchlawackWhen contributing to other usersā€™ repositories, always start a new branch in your fork.Reasons to not use mainForces you to only have one change in progressMerges will generate conflicts and you canā€™t pull from that branch anymore. Need to kill the fork and start overIf the target repo has branch protection on, then maintainers canā€™t push to your branch.Hynek also provides a way to fix things if youā€™ve already started your changes on a main branch fork.

    Michael #4: instld: The simplest package management

    Thanks to this package, it is very easy to manage the lifecycle of packages.āš” Run your code without installing libraries.āš” You can use 2 different versions of the same library in the same program.āš” You can use incompatible libraries in the same project, as well as libraries with incompatible/conflicting dependencies.āš” It's easy to share written scripts. The script file becomes self-sufficient - the user does not need to install the necessary libraries.āš” The library does not leave behind "garbage". After the end of the program, no additional files remain in the system.

    Extras

    Brian:

    The Complete pytest Course is now actually completeAlthough updates will happen when and if necessary as pytest/Python changes.To celebrate, use code 2024 in January for 10% off any pricing option.More episodes of Python People and Python Test on the way nowThat course took up a lot of my time in late 2023Just released an episode with Will Vincent and Python Test will have a new episode this week and for the foreseeable future.Let me know if you want to be on Python People or Python Test

    Michael:

    Hatch follow up: Great coverage of Hatch v1.8.0! One small correction: only the binaries for Hatch are signed with the certificate from the PSF. - OfekPyPI new user registration temporarily suspendedPagefind and how Iā€™m using itTalk Python Live: Data Doodles event coming early FebNew essay: AI Features a Waste of Time?

    Joke: Put it in the backlog

  • Topics covered in this episode:
    * Hatch v1.8*svcs: A Flexible Service Locator for PythonSteering Council 2024 Term Election ResultsPython protocols. When to use them in your projects to abstract and decouplingExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/365

  • Topics covered in this episode:
    A Python/Django Advent calendarDropbase helps you build internal web apps with PythonReal-world match/caseExtra, extra, extra, so many extras!ExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/364

  • Topics covered in this episode:
    Fixit 2: Metaā€™s next-generation auto-fixing linterFastUIMail list / newsletter conversationCLIs from type hintsExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/363

  • Topics covered in this episode:
    Habits of great software engineersFlask 3.0Build Conway's Game of Life With Pythonpolars businessExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/362

  • Topics covered in this episode:
    The many shapes and sizes of keyboardsappeal - a CLI framework from Larry HastingsGraphinate: Data to GraphsA Disorganized List of Maintainer TasksExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/361

  • Topics covered in this episode:
    exclude_also with coverage.pyWriteside* Extra, extra, extra*Chrome not proceeding with Web Integrity API deemed by many to be DRMExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/360

  • Topics covered in this episode:
    PyCon 2024 is up?Ruff formatter is production readygil--;Why is the Django Admin ā€œUglyā€?ExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/359

  • Topics covered in this episode:
    Django 5.0 beta 1 releasedgit bash, terminals, and WindowsMastering Integration Testing with FastAPIReuven Learner has been banned for trading in rare animals (Pythons and Pandas)ExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/358

  • Topics covered in this episode:
    QuickMacHotKeyThings Iā€™ve learned about building CLI tools in PythonWarp Terminal (referral code)Python 3.7 EOLed, but I hadnā€™t noticedExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/357