from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, Float
Base = declarative_base()
class Report(Base):
__tablename__ = 'report'
id = Column(Integer, primary_key=True)
a=Column('a',String)
b=Column('b',Integer)
c= Column('c', Integer)
data=ChildClass(b,c)
def __init__(self, o,new_data):
self.a = o
self.data=new_data;
class ChildClass(object):
def __init__(self,bdata,cdata):
self.b=bdata
self.c=cdata
Api :
@app.route('/getdata', methods=['GET'])
def get_operator():
try:
engine
…
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)