from typing import Optional

from sqlmodel import Field, SQLModel, create_engine


class Student(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    first_name: str
    last_name: str
    email: str
    # dob: 


sqlite_url = "sqlite:///school.db"
engine = create_engine(sqlite_url)
SQLModel.metadata.create_all(engine)

sqlmodel.SQLModel.metadata.create_all sqlmodel.Field sqlmodel.create_engine
[((294, 319), 'sqlmodel.create_engine', 'create_engine', (['sqlite_url'], {}), '(sqlite_url)\n', (307, 319), False, 'from sqlmodel import Field, SQLModel, create_engine\n'), ((320, 356), 'sqlmodel.SQLModel.metadata.create_all', 'SQLModel.metadata.create_all', (['engine'], {}), '(engine)\n', (348, 356), False, 'from sqlmodel import Field, SQLModel, create_engine\n'), ((144, 181), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (149, 181), False, 'from sqlmodel import Field, SQLModel, create_engine\n')]