On this page
article
codecs — Codec Registry
Encode/decode text encodings.
Overview
Encode/decode text encodings.
Quick Example
codecs.open('file.txt', 'r', 'utf-8')
When to Use
Use this module when you need built-in support without adding third-party dependencies.
Common Tasks
- Read the official docs: docs.python.org/3/library/codecs.html
- Combine with related modules in the Cookbook
- Prefer stdlib before reaching for PyPI packages