📜  声明性基础 sqlalchemy - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:02.584000             🧑  作者: Mango

代码示例1
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class SomeClass(Base):
    __tablename__ = 'some_table'
    id = Column(Integer, primary_key=True)
    name =  Column(String(50))