pyproject.toml is a TOML configuration file for packaging tools. This article explains the standardized tables [build-system], [project] and [tool], required versus optional keys, and how the file differs from a pip lock file.
python / packaging / pyproject-toml / build-system / dependencies / pip / toml
A step‑by‑step guide to achieve repeatable installs using pip requirements, hash verification, and wheelhouse bundles, while separating project metadata in pyproject.toml. No claims are made about json.loads or object_hook.
pip / repeatable-installs / requirements-pinning / hash-checking / wheelhouse / pyproject-toml / environment-reproducibility
The json.loads and json.load functions in Python accept bytes and bytearray inputs since version 3.6, automatically detecting UTF-8, UTF-16, or UTF-32 encoding. If the encoding is incorrect, UnicodeDecodeError is raised. The strict parameter controls handling of control characters in JSON strings. Practical scenarios and limitations are discussed.
Python 3.6+ / JSON / bytes and bytearray / UTF-8/UTF-16/UTF-32 / UnicodeDecodeError / strict parameter / pathlib / binary files
Learn how to control JSON serialization using separators, indentation, key sorting, and ASCII encoding to optimize for machine or human readability.
python / json / serialization / formatting / api / debugging / encoding / data-interchange
Learn to declare entry points in pyproject.toml using the three supported tables. Avoid nested subtables and duplicate definitions to prevent installation errors.
Python / Packaging / pyproject.toml / Entry Points / CLI / Scripts
PEP 639 replaced the legacy license table with a single SPDX expression string and introduced license-files for glob-based license distribution, while deprecating License:: classifiers.
pyproject.toml / PEP 639 / SPDX / license-files / classifiers / packaging
Reproducibility is built in layers: exact version pins, SHA-256 artifact hashes, and a bundled wheelhouse for offline installs. Each layer removes a different source of drift, and none of them replaces pyproject.toml, which describes how the project itself is built.
python / dependency-management / pip / reproducibility / sha256 / wheelhouse / packaging / pyproject-toml
pyproject.toml is a TOML configuration file for packaging tools. Learn how [build-system], [project] and [tool] tables, dependencies and entry points fit together, and how they relate to repeatable pip installs.
python / packaging / pyproject.toml / pip / entry-points
A guide to using the Python csv module to automatically detect delimiters, handle Unicode Byte Order Marks (BOM) with utf-8-sig, and manage platform-specific newline issues using the Sniffer class and correct file opening parameters.
python / csv / data-processing / encoding / utf-8-sig / automation
Use default or a JSONEncoder subclass to convert unsupported Python values into an explicit JSON representation. An unhandled TypeError stops the whole dump. Add object_hook only when you need to reconstruct custom types from marker objects.
json / serialization / JSONEncoder / default / object_hook / python-standard-library / datetime / complex
A wheelhouse is a pre-built directory of wheels created on a network-connected build machine and installed offline on a target machine. Pin a requirements file, run pip wheel, archive with tar, then install with --no-index --no-deps --force-reinstall.
wheelhouse / offline-install / pip-wheel / repeatable-installs / hash-checking / requirements-file / pyproject-toml / build-dependencies
How to read, modify, and synchronize environment variables in Python using os.environ and os.environb, handle encoding differences across platforms, and pass environment to child processes.
os.environ / os.environb / environment-variables / python-os / utf8-mode / cross-platform / child-process / reload_environ
Distinguish missing and empty settings, parse ports and booleans explicitly, and report configuration errors without exposing secrets.
Python / Configuration / Environment / Validation
Use ISO timestamp strings and decimal strings, then reconstruct the fields explicitly. A complete standard-library example shows timezone checks, precision and predictable failures.
JSON / Serialization / Deserialization / Datetime / Decimal / Python / Data Contract / Type Handling
Learn how to parse JSON data in Python from both string literals and files, and how to effectively handle potential decoding errors using the built-in json module.
python / json / parsing / decoding / file handling / error handling / pathlib / data serialization
Use a named logger, configure the application once, and attach safe context without duplicating every error.
programming
A practical guide to using pathlib for file existence checks, extension manipulation, directory navigation, and path resolution without introducing platform-specific bugs on Windows or Unix systems.
pathlib / cross-platform / python / file-system / os.PathLike / PurePath / glob / resolve
Preserve shared history or replay local work before integration.
Git / Merge / Rebase
How Python resolves relative paths depends on the process working directory, which varies by launcher. This guide shows how to inspect the working directory, choose and document an explicit path base, and understand why __file__ cannot always be trusted.
Python / pathlib / relative paths / working directory / __file__ / os.getcwd
A small, repeatable setup for a project and a quick check that pip uses the right Python.
Python / venv / pip