The Real Python Podcast

Configuring a Coding Environment on Windows & Using TOML With Python

37 snips
Aug 19, 2022
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

TOML as Python's New Config Format

  • TOML is a type-aware configuration language ideal for Python package configuration.
  • Python 3.11 includes a standard TOML parser, simplifying its use and adoption.
ADVICE

Use pathlib Over os.path

  • Switch from os.path to pathlib for better, object-oriented file path management.
  • pathlib improves code readability and handles cross-platform paths effortlessly.
ADVICE

Use secrets for Security

  • Use the secrets module instead of random or os.urandom for generating cryptographically safe tokens.
  • Secrets module is best suited for tasks like password creation and secure keys.
Get the Snipd Podcast app to discover more snips from this episode
Get the app