edgedb-python
edgedb-python copied to clipboard
"fastapi dev" flow
-
fastapi devshould work out of the box. Ideal setup: a user starts a new fastapi project, imports gel, runs 'gel init', and the rest (1️⃣ watching, 2️⃣ reflecting schema, 3️⃣ backups) is set up automatically. -
There should be a way to opt-out, via:
- a setting in pyproject.toml
[tools.gel]- scenario: you work alone, or the team doesn't want this)
- via an env var
GEL_FASTAPI_DEV=disabled- scenario: CI or some other weird edge case
- in the future we should add support for
.env.localthemselves by having.no_gel_fastapi_devfile and ignoring it
- a setting in pyproject.toml
-
We need
gel watchto accept command line arggel watch --extend-gel-toml FILEwith a location of a additionalgel.tomlfile that might have additional hooks/settings. That additional file will not override, but will extend viagel.toml:[hooks] # <--- new thing schema.update.after="cmd0"--extend-gel-toml:[hooks-extend] # <--- new thing schema.update.after="cmd1"then the actual hook will be
cmd0 && cmd1