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.

#324 JSON in My DB?

February 21, 2023 00:44:53 43.28 MB Downloads: 0
Watch on YouTube

About the show

Sponsored by Compiler Podcast from Red Hat. Connect with the hosts

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: Use TOML for .env files?

  • Brett Cannon
  • .env files are used to store default settings that can be overridden by environmental variables.
  • Possibly brought on by twelve-factor app design.
  • Supported by python-dotenv, which is also used by pydantic, pipenv, and others.
  • One issue is that it’s not a defined standard.
    • from python-dotenv docs “The format is not formally specified and still improves over time. That being said, .env files should mostly look like Bash files.”
  • Adafruit decided that an upcoming CircuitPython will use TOML as the format for settings.toml files, which are to be used mostly how .env files are being used.
  • Brett notices this may fix things for Python for VS Code, and other people as well.
  • So… Is this a good idea? I think so.

Michael #2: Pydantic gets serious funding

  • via Mark Little (was on episode 285)
  • Sequoia backs open source data-validation framework Pydantic to commercialize with cloud services.
  • Pydantic Services Inc. emerges from stealth today with $4.7 million in seed funding.
  • Pydantic’s new commercial entity will incorporate a swath of new tools and services that are both “powered-by and inspired-by the Pydantic library”
  • Pydantic will start with an initial team of six, with the first three engineers based in Montana, Chicago and Berlin.
  • “With $4.7 million in the bank, Colvin said that they’re continuing to rewrite parts of Pydantic in Rust, with a view toward making it more efficient via a ten-fold performance improvement.”

Erin #3: JSON Fields for performance (Denormalization)

  • David Stokes
  • Using JSON fields when you design your databases is a good way to improve database query performance.

Brian #4: f-strings with pandas and Jupyter keyboard shortcuts

  • Kevin Markham
  • After a couple year break from blogging, friend of the show Kevin Markham has a couple great, short, useful posts.
  • How to use Python's f-strings with pandas
    • My favorite bit is the part about using f-strings for dictionary keys
  • Fly through Jupyter with keyboard shortcuts 🚀
    • I’m a sucker for a rocket emoji
    • Not an overwhelming list. Just the essentials for even the casual Jupyter user.
    • Examples
      • Esc and Enter for command mode/edit mode
      • a and b for creating a new cell above or below current cell.
      • m and y for changing the cell type to Markdown or code.
      • Shift+m to merge cells
      • so many more
  • -

Michael #5: BioGPT

Erin #6: Code Mentorship and Communicating with Newer Devs

Extras:

Michael:

Erin:

Joke: