Python guides
Every published Python guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Python guides
Most readLatest Python guides
Page 15 of 179python jsonschema vs pydantic: Choosing the Right Validation Tool
Compare jsonschema and Pydantic for Python data validation: declarative JSON Schema vs type-hint-based models, type coercion, error handling, and when to use each.
Python jsonschema Formats and Validation Errors
python jsonschema formats and validation errors: Learn how jsonschema format validation works, why formats are ignored by default, and how to read and handle Validatio...
Python jsonschema: Validate Required Nested and Arrays
python jsonschema validate json required nested and arrays: Learn how to use Python jsonschema to validate JSON with required fields, nested objects, and arrays, inclu...
Python tomllib vs tomlkit: Which TOML Parser?
python tomllib vs tomlkit: Compare Python's tomllib and tomlkit for reading and editing TOML files. Learn which library fits your parsing and round-trip needs.
Read, Modify, and Write TOML with Python tomlkit
Learn how to read, modify, and write TOML files in Python with the tomlkit library while preserving comments, key order, and formatting.
Python tomllib: Read pyproject.toml Files
Read pyproject.toml with Python's tomllib: TOML loading, nested data, error handling, and tomli on older Python versions.
Python PyYAML Custom Tags: Load and Dump Custom Types
Learn how to register custom YAML tags in PyYAML with constructors and representers, load custom Python types safely, and handle unknown tags.
Python PyYAML: Dictionaries, Lists, and Multiple Documents
Learn how PyYAML maps YAML to Python dictionaries and lists, loads nested data, and parses multiple documents from one stream with safe_load_all.
PyYAML safe_load vs load: Which One Should You Use?
PyYAML safe_load vs load: why safe_load is the secure default, how unsafe loaders can execute arbitrary code, and when a custom SafeLoader is the right choice.
Python PyYAML: Read and Write YAML Safely
Learn how to use PyYAML's safe_load() and safe_dump() to read and write YAML files without exposing your application to code injection.