PythonのO/RマッパーでSQLを操作できるSQLAlchemyを紹介します。他のPythonライブラリとの連動もしやすいため非常に便利なライブラリです。 O/Rマッパーのメリット/デメリットの記事を参考に貼っておきます。 なおサンプルデータは下記を使用していきます。
Python で DB を扱うとき、こんな書き方をしていませんか? sql = "SELECT * FROM users WHERE id = %s" % user_id といった問題を抱えてい ...
fastapi-contacts-api │ ├── main.py # FastAPI application entry point ├── database.py # Database engine and session configuration ├── models.py # SQLAlchemy database models ├── schemas.py # Pydantic ...
A task-management API (users, projects, tasks) built with FastAPI, SQLAlchemy 2.0 and PostgreSQL. It is the companion to the Laravel implementation: the same domain, a different stack. A user owns ...