×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: kushedow Кушедов
Added: Oct 16, 2021 2:26 PM
Modified: Dec 12, 2021 8:32 AM
Views: 2342
Tags: sqlalchemy
  1. from flask import Flask
  2. from flask_sqlalchemy import SQLAlchemy
  3. from sqlalchemy import Column, Integer, String, Boolean, Text, SmallInteger, ForeignKey, CheckConstraint
  4. from sqlalchemy.orm import relationship
  5.  
  6. app = Flask(__name__)
  7. app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
  8. app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
  9. db = SQLAlchemy(app)
  10.  
  11. app.run()