from typing import Optional

from sqlmodel import Session
from db.base import engine
from db.models import Plant


def create_plants():
    plant_1 = Plant(name="Hebe")
    plant_2 = Plant(name="Astilbe")
    plant_3 = Plant(name="Sedum")
    plant_4 = Plant(name="Helenium")
    plant_5 = Plant(name="Heather")

    session = Session(engine)

    session.add(plant_1)
    session.add(plant_2)
    session.add(plant_3)
    session.add(plant_4)
    session.add(plant_5)

    session.commit()

    session.close()


def main():
    create_plants()


if __name__ == "__main__":
    main()
sqlmodel.Session db.models.Plant
[((150, 168), 'db.models.Plant', 'Plant', ([], {'name': '"""Hebe"""'}), "(name='Hebe')\n", (155, 168), False, 'from db.models import Plant\n'), ((183, 204), 'db.models.Plant', 'Plant', ([], {'name': '"""Astilbe"""'}), "(name='Astilbe')\n", (188, 204), False, 'from db.models import Plant\n'), ((219, 238), 'db.models.Plant', 'Plant', ([], {'name': '"""Sedum"""'}), "(name='Sedum')\n", (224, 238), False, 'from db.models import Plant\n'), ((253, 275), 'db.models.Plant', 'Plant', ([], {'name': '"""Helenium"""'}), "(name='Helenium')\n", (258, 275), False, 'from db.models import Plant\n'), ((290, 311), 'db.models.Plant', 'Plant', ([], {'name': '"""Heather"""'}), "(name='Heather')\n", (295, 311), False, 'from db.models import Plant\n'), ((327, 342), 'sqlmodel.Session', 'Session', (['engine'], {}), '(engine)\n', (334, 342), False, 'from sqlmodel import Session\n')]