Skip to content

CLI feature idea: pass a block of Python code that yields rows to be inserted #684

@simonw

Description

@simonw

The Python CLI equivalent of this:

def rows():
    yield {"id": 1, "name": "Cleo"}
    yield {"id": 2, "name": "Suna"}

db["creatures"].insert_all(rows())

Similar to the --functions mechanism, recently extended in:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions