pallets-eco/flask-sqlalchemy
pallets-eco/flask-sqlalchemy has 4,301 GitHub stars and 904 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and +1 in 15 days. Last checked 2026-11-21 14:37 UTC. Last push 2026-05-18.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
Flask에 SQLAlchemy 지원을 추가합니다
데이터README.md
OriginalFlask-SQLAlchemy
Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy to your application. It aims to simplify using SQLAlchemy with Flask by providing useful defaults and extra helpers that make it easier to accomplish common tasks.
Pallets Community Ecosystem
[!IMPORTANT]
This project is part of the Pallets Community Ecosystem. Pallets is the open source organization that maintains Flask; Pallets-Eco enables community maintenance of Flask extensions. If you are interested in helping maintain this project, please reach out on the Pallets Discord server.
A Simple Example
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///example.sqlite"
class Base(DeclarativeBase):
pass
db = SQLAlchemy(app, model_class=Base)
class User(db.Model):
id: Mapped[int] = mapped_column(primary_key=True)
username: Mapped[str] = mapped_column(unique=True)
with app.app_context():
db.create_all()
db.session.add(User(username="example"))
db.session.commit()
users = db.session.scalars(db.select(User))
관련 프로젝트 살펴보기
불러오는 중…