utils.py 362 B

1234567891011121314
  1. import os
  2. from sqlalchemy import create_engine, MetaData, orm
  3. from sqlalchemy.ext.declarative import declarative_base
  4. pengine_rc = create_engine("postgresql://xpertconnect:123@localhost:5432/rsa_crawling")
  5. Base = declarative_base()
  6. metadata_rc = MetaData(pengine_rc)
  7. metadata_rc.reflect()
  8. Session_rc = orm.sessionmaker(pengine_rc)
  9. session_rc = Session_rc()