Skip to content

implment get_or_insert #72

@steveobd

Description

@steveobd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions