Project conventions, architecture, and coding patterns synthesized from PyIceberg developers.
When assessing potential vulnerabilities or calibrating automated security findings, use SECURITY-THREAT-MODEL.md as the authoritative detailed description of this repository's security boundaries, trust assumptions, and non-boundaries.
PyIceberg is a pure-Python library — it has no separate engine modules. The code lives under pyiceberg/, organized by concern rather than by engine:
schema.py, types.py, transforms.py, partitioning.py, conversions.py: The table spec core — schemas, types, partition specs, and value conversions. Must stay engine- and catalog-agnostic.table/: Table abstraction, metadata (metadata.py), snapshots, refs, sort orders, and the transaction/update machinery (table/update/). The commit path lives here.catalog/: Catalog implementations — rest/, hive, glue, dynamodb, sql, bigquery_metastore, memory, noop. New catalogs subclass the base Catalog in catalog/__init__.py. Catalog-specific assumptions must not leak into table/ or the spec core.io/: The FileIO abstraction over storage. pyarrow.py and fsspec.py are the two backends. Never hard-code a storage SDK where FileIO exists.expressions/: The expression DSL and its visitors (predicate binding, projection, evaluation).avro/, manifest.py: Manifest and Avro read/write — performance-sensitive, partly accelerated by Cython.cli/: The pyiceberg command-line interface (Click + Rich).utils/: Shared helpers (deprecated.py, concurrent.py, config.py, bin_packing.py, singleton.py, etc.). Check here before writing new utility code.ruff via prek (pre-commit): line length 130, double-quoted strings, isort with pyiceberg/tests as first-party. Run make lint — ruff autofixes most issues.mypy runs in strict mode: disallow_untyped_defs, no_implicit_optional, warn_unused_ignores). Avoid Any types.pyproject.toml, not core dependencies.make install (installs uv, syncs all extras, builds Cython, installs pre-commit hooks)make testmake test PYTEST_ARGS="-v -k <pattern>"make test-integration (rebuild with make test-integration-rebuild)make test-s3 / make test-adls / make test-gcsmake lintmake docs-serve / make docs-buildmake cleanPYTHON=3.12, e.g. PYTHON=3.12 make install./dev/check-license).make lint and make test before pushing; CI runs both plus the lockfile check.uv.lock by hand — regenerate it with uv lock.boto3, s3fs, gcsfs, adlfs) outside its FileIO backend module.@deprecated cycle.schema.py, types.py, table/metadata.py)._-prefixed) APIs to public.