python_bot/sqdb.py
Pavel_Duron ceb43511ef
All checks were successful
continuous-integration/drone/push Build is passing
fix
2022-11-09 22:57:49 +10:00

43 lines
849 B
Python

from sqlalchemy import create_engine, MetaData, Table, Integer, String, \
Column, DateTime, ForeignKey, Numeric
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///dick3.db')
Session = sessionmaker(bind=engine)
session = Session()
Base = declarative_base()
class user(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
user_id = Column(Integer)
user_fullname = Column(String)
#list = user(user_id = message.from_user.id, user_fullname = message.from_user.full_name)
class tert:
async def adding():
session.add(lisq)
session.commit()
#tert.adding() # добавляет запись и коммитит
#Base.metadata.create_all(engine)
listq2 = bot.ident.lisq()
print(listq2)