committed 09:26PM - 22 Jun 26 UTC
Extract the `ingest` command's pipeline assembly into a plain callable,
`run_ing…est()` in `omniload/api.py`, so omniload can be driven from Python
applications, not only the shell. This makes the documented "or the Python API
from your own applications" claim demonstrable.
- `run_ingest()` returns the dlt `LoadInfo` for the run and keeps the heavy dlt
imports lazy, matching the CLI's fast-startup behaviour. Its defaults are
byte-identical to the CLI option defaults.
- `ingest` becomes a thin wrapper over `run_ingest()`; CLI option names,
behaviour, exit codes, and stdout are unchanged.
- The API raises library exceptions instead of typer control flow:
`ValidationError` for invalid parameters and `IngestJobError` (carrying the
failed jobs) when load jobs fail. A `quiet` flag suppresses the progress
chrome when embedding, and `dry_run` returns `None`.
- Enum parameters accept either an enum member or its CLI string value, so
callers need not import the enums.
- Re-export `run_ingest`, the strategy enums, and the exceptions from the
package (`from omniload import run_ingest`).
- Document the Python API: a README section and a new
`docs/getting-started/python-api.md` page in the Handbook toctree.