Real Python
  • Start Here
  • Learn Python
    Python Tutorials →
    In-depth articles and video courses
    Learning Paths →
    Guided study plans for accelerated learning
    Quizzes & Exercises →
    Check your learning progress
    Browse Topics →
    Focus on a specific area or skill level
    Community Chat →
    Learn with other Pythonistas
    Office Hours →
    Live Q&A calls with Python experts
    Podcast →
    Hear what’s new in the world of Python
    Books →
    Round out your knowledge and learn offline
    Reference →
    Concise definitions for common Python terms
    Code Mentor →Beta
    Personalized code assistance & learning tools
    Unlock All Content →
  • More
    Learner Stories Python Newsletter Python Job Board Meet the Team Become a Tutorial Writer Become a Video Instructor
  • Search
  • Join
  • Sign‑In
Browse Topics Guided Learning Paths
Basics Intermediate Advanced
ai algorithms api best-practices career community databases data-science data-structures data-viz devops django docker editors flask front-end gamedev gui machine-learning news numpy projects python stdlib testing tools web-dev web-scraping

Table of Contents

  • Use TOML as a Configuration Format
    • Configurations and Configuration Files
    • TOML: Tom’s Obvious Minimal Language
    • TOML Schema Validation
  • Get to Know TOML: Key-Value Pairs
    • Strings, Numbers, and Booleans
    • Tables
    • Times and Dates
    • Arrays
  • Load TOML With Python
    • Read TOML Documents With tomli and tomllib
    • Compare TOML Types and Python Types
    • Use Configuration Files in Your Projects
  • Dump Python Objects as TOML
    • Convert Dictionaries to TOML
    • Write TOML Documents With tomli_w
  • Create New TOML Documents
    • Format and Style TOML Documents
    • Create TOML From Scratch With tomlkit
  • Update Existing TOML Documents
    • Represent TOML as tomlkit Objects
    • Read and Write TOML Losslessly
  • Conclusion
  • Frequently Asked Questions

Recommended Course