Claude Codeの検証がてら作った、FastAPI+SQLAlchemy+MySQLのレシピ管理APIがある。CRUDだけのシンプルな構成だけど、SQLAlchemyの基本的な使い方を整理するにはちょうどいい題材だったので、実際のコードを見ながらまとめておく。 リポジトリはこちら。 生のSQL文字 ...
"""User model using FastJango SQLAlchemy compatibility.""" __tablename__ = 'users' username = CharField(max_length=150, unique=True) email = CharField(max_length=254 ...
About This demo aims to be easy to read and extend. It's intended for developers who want a compact example of integrating FastAPI with a MySQL database via SQLAlchemy. (You can replace ...