firedantic
firedantic copied to clipboard
Database models for Firestore using Pydantic base models.
I'd like to be able to exclude unset and null fields from being saved to firestore
It would be handy to have a `.reload()` on the models to re-fetch them from the DB instead of having to manually get the id and then load by id....
We seem to be using both `"""Comment` and `"""\nComment`, we should unify to -> `"""\nComment`.
Run `poetry update` and commit changes if no issues arise from it.
Run `pre-commit autoupdate` and commit results if they work
E.g. the new Python `Self` type could be useful to help better define the types for model classes and get better IDE support for typing. We'd likely have to bump...
Would be nice to wrap Firestore exceptions in FiredanticError class with original_exception set or similar.
https://firebase.google.com/docs/firestore/manage-data/transactions Without this, cloud functions that share a trigger invariably enter a race condition.
Had a bug with this kind of typo, it failed silently: ```python 'id': {"==": my_id}, 'some_value': {">=", condition_value} #has , instead of : ``` This makes the linter catch it....