Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implment get_or_insert #72

Open
steveobd opened this issue Jun 25, 2024 · 0 comments
Open

implment get_or_insert #72

steveobd opened this issue Jun 25, 2024 · 0 comments

Comments

@steveobd
Copy link

NDB has this and it is handy.

https://github.com/googleapis/python-ndb/blob/982f8a70dfa4b940c162ce327441099aca982d21/google/cloud/ndb/model.py#L5937

It's a little more difficult with pydantic since non-optional fields have to be populated (I think) even in a constructor, but it should be doable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant