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

#292 Thursday, it's always a Thursday

July 11, 2022 00:28:36 24.26 MB Downloads: 0

Watch the live stream:

Watch on YouTube

About the show

Sponsored by Microsoft for Startups Founders Hub.

Brian #1: rich-codex

  • by Phil Ewels
  • suggested by Will McGugan
  • “A GitHub Action / command-line tool which generates screen grab images of a terminal window, containing command outputs or code snippets.”
  • Generate images from commands embedded in markdown files, like README.md, for example.
    • Searches through markdown files for stuff like: ![cat cat.txt | lolcat -S 1](img/cat.svg)
    • then runs the command, and generates the image.
  • Can be done within a GitHub action
  • Can also send code snippets or json to rich-cli, then generate an image.
  • You can also have commands in a config file,
  • Very easy to use, makes very professional looking images for documentation, that’s always up to date.

Michael #2: Pydastic

  • via Roman Right, by Rami Awar
  • Pydastic is an elasticsearch python ORM based on Pydantic.
  • Core Features
    • Simple CRUD operations supported
    • Sessions for simplifying bulk operations (a la SQLAlchemy)
    • Dynamic index support when committing operations
  • More on Elasticsearch here

Brian #3: 3 Things to Know Before Building with PyScript

  • by Braden Riggs
  • Package indentation matters
  • Local file access is possible.

            [HTML_REMOVED]
        - numpy
        - pandas
        - paths:
            - /views.csv
            [HTML_REMOVED]
    
    • DOM manipulation has interesting conventions
    • For buttons, you can include pys-onClick=”your_function” parameter to trigger python functions when clicked.
    • For retrieving user input from within the [HTML_REMOVED] tag document.getElementById(‘input_obj_id’).value can retrieve the input value.
    • And Finally pyscript.write(“output_obj_id”, data) can write output to a tag from within the [HTML_REMOVED] tag.
  • Michael's Pyscript videos

Michael #4: disnake

  • via Sean Koenig
  • disnake is a modern, easy to use, feature-rich, and async-ready API wrapper for Discord.
  • Features:
    • Modern Pythonic API using async/await syntax
    • Sane rate limit handling that prevents 429 errors
    • Command extension to aid with bot creation
    • Easy to use with an object oriented design
    • Optimized for both speed and memory
    • Quickstart
    • Commands API

Extras

Michael:

Joke: Better than a wage increase