Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

Episode #239: No module named pythonbytes

Published Wed, Jun 23, 2021, recorded Wed, Jun 23, 2021.



Watch the live stream:

About the show

Sponsored by us:

Special guest: Nick Muoh

Brain #1: ormar : an async mini ORM for Python, with support for Postgres, MySQL, and SQLite.

  • suggested by John Hagen
  • From John: “It's a really cool ORM that combines Pydantic models and SQL models into a single definition. What is great about this, is it can be used to reduce repetitive duplication between Models for an ORM and the Pydantic Models that FastAPI needs to describe serialization. … If you have very pure-data heavy abstractions where your input and outputs through the API are roughly equivalent to your database, this helps you avoid needing to duplicate tons of SQLAlchemy classes and Pydantic that look identical and now you need to keep them in sync (DRY issue).”

Michael #2: No module named

Nick #3: JupyterLite

  • Jeremy Tuloup
  • JupyterLite is a JupyterLab distribution that runs entirely in the browser built from the ground-up using JupyterLab components and extensions.
  • Python kernel backed by Pyodide running in a Web Worker
  • Kernels include
    • Python 3.8 (pyolite implementation)
    • Javascript
    • P5.js
  • Data is written to in-browser storage
  • Data doesn’t leave the browser unless you are using extensions or use browser’s fetch API

Brian #4: Lot of plots

  • Dylan Castillo
  • Side by side comparison of plots.
  • with: pandas, matplotlib, seaborn, plotly.express
  • plotting: line, grouped bars, stacked bars, area, pie/donut, histogram, scatter, and box
  • Many plotting articles talk about cool stuff you can do with a particular library.
  • This is nice in that they all can do these things, so you can
    • see the output of each and compare
    • see the code that goes into making each, and see what style of api you might like to work with

Michael #5: Monty, Mongo tinified. MongoDB implemented in Python

  • Monty, Mongo tinified. MongoDB implemented in Python
  • Inspired by TinyDB and it's extension TinyMongo
  • A pure Python-implemented database that looks and works like MongoDB.
  • 🦄 Available storage engines:
    • in-memory
    • flat-file
    • sqlite
    • lmdb (lightning memory-mapped db)
  • Tools and utilities like mongodump.

Nick #6: Exhaustiveness Checking with Mypy

  • Haki Benita
  • Exhaustiveness checking is a common feature of type checkers where the type checker guarantees that the programmer has covered all cases.
  • Using Mypy, you can be warned at compile time about missing cases that should be handled in your code.
  • Works great when using Enums, Union Types, or Literals
  • Mypy leverage a concept called “type narrowing” where the type of a variable becomes more and more confined based on the control flow of a program.
  • Can be useful when using ModelChoices in Django.

Extras

Michael

Brian

Nick

  • Join us virtually at the Cleveland’s Python Meetup CLEpy
  • Registration for PyOhio 2021 is open and the national conference begins July 31 (We have cool T-Shirts)

Joke

Rootbeer float

  • A programmer walks into a bar...
  • He orders 1.000000119 root beers.
  • The bartender says, “ I’m gonna have to charge you extra, that’s a root beer float.”
  • The programmer says, “Well in that case make it a double.”

It Haunts Us

It haunts us | CommitStrip

How much does a chimney cost? It's free, it's on the house.