How to add all elements from python dictionary to database?
问题 I'm trying to add the elements of a dictionary to the database. I'm completely new to working with databases and I'm just wondering if I'm doing it right or not, because it seems to me that not. If so, how can I do it ? And how can I print all the elements of the database then ? from sqlalchemy import Column, String, Integer, create_engine from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Person(Base):