from typing import List, Optional

from sqlmodel import Field, Session, SQLModel, create_engine


class Zi(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str = Field(...)
    stroke_count: int = Field(...)
    strokes: str = Field(...)
    heng_count: int = Field(...)
    shu_count: int = Field(...)
    pie_count: int = Field(...)
    dian_count: int = Field(...)
    zhe_count: int = Field(...)


engine = create_engine('sqlite:///Data/strokes.db', connect_args={'check_same_thread': False})
SQLModel.metadata.create_all(engine)
session = Session(engine)

sqlmodel.Session sqlmodel.SQLModel.metadata.create_all sqlmodel.create_engine sqlmodel.Field
[((474, 564), 'sqlmodel.create_engine', 'create_engine', (['"""sqlite:///Data/strokes.db"""'], {'connect_args': "{'check_same_thread': False}"}), "('sqlite:///Data/strokes.db', connect_args={\n    'check_same_thread': False})\n", (487, 564), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((561, 597), 'sqlmodel.SQLModel.metadata.create_all', 'SQLModel.metadata.create_all', (['engine'], {}), '(engine)\n', (589, 597), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((609, 624), 'sqlmodel.Session', 'Session', (['engine'], {}), '(engine)\n', (616, 624), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((160, 197), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (165, 197), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((215, 225), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (220, 225), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((251, 261), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (256, 261), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((282, 292), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (287, 292), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((316, 326), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (321, 326), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((349, 359), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (354, 359), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((382, 392), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (387, 392), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((416, 426), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (421, 426), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n'), ((449, 459), 'sqlmodel.Field', 'Field', (['...'], {}), '(...)\n', (454, 459), False, 'from sqlmodel import Field, Session, SQLModel, create_engine\n')]