#324: JSON in My DB?
Published Tue, Feb 21, 2023,
recorded Tue, Feb 21, 2023
About the show
Sponsored by Compiler Podcast from Red Hat. Connect with the hosts
- Michael: @mkennedy@fosstodon.org
- Brian: @brianokken@fosstodon.org
- Show: @pythonbytes@fosstodon.org
- Special guest, Erin Mullaney: @erinrachel@fosstodon.org
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.”
- from python-dotenv docs “The format is not formally specified and still improves over time. That being said,
- 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
andEnter
for command mode/edit modea
andb
for creating a new cell above or below current cell.m
andy
for changing the cell type to Markdown or code.Shift+m
to merge cells- so many more
-
Michael #5: BioGPT
- “GPT” for biomedical text generation and mining
- As motivation, let’s see what ChatGPT can do with arrow anti-patterns in Python.
- Smaller models and “Large” models
- Used via an API rather than chat style.
- BioGPT has also been integrated into the Hugging Face
transformers
library too - Play with it here.
Erin #6: Code Mentorship and Communicating with Newer Devs
- Sheena O’Connell
- Sheena O’Connell gave a talk at DjangoCon about her work at Umuzi, training unemployed young people in underserved communities in Africa and also was on Django Chat Podcast.
- Dmitriy Chukhin
- Caktus Group is trying a new mentorship program for folks who don’t have the necessary training.
Extras:
Michael:
- News is, these are no loner news: Security Researchers Uncover 700+ Malicious Open-Source Packages in npm and PyPI
- Git security vulnerabilities announced, again
- git ignores
Erin:
- DjangoCon is in October in Durham, NC this year (Oct 15-20)
Joke: