PlaySQLAlchemy: SQLAlchemy入門1. SQLAlchemy 入門 for Kobe Python Meetup #13 2017/09/15 Kobe Japan 2. Yasushi Masuda PhD ( @whosaysni ) Tech team, Core IT grp. IT Dept. MonotaRO Co., LTD. Pythonista since 2001 (2.0~) • elaphe (barcode library) • oikami.py (老神.py) • PyCon JP founder 翻訳もろもろ 3. アジェンダ よくある誤解 SQLAlchemyを3行で エンジンの基礎 (+hands-on) SQL式を使う (+hands-on) ORMの基礎 (+hands-on) 4. 参考文献 オンラインドキュメント: http
The Python SQL Toolkit and Object Relational Mapper SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language. Documentation Curre
SQLAlchemyとは SQLAlchemyとは,Pythonの中でよく利用されているORMの1つ. ORMとは,Object Relational Mapperのことで,簡単に説明すると,テーブルとクラスを1対1に対応させて,そのクラスのメソッド経由でデータを取得したり,変更したりできるようにする存在. ORMの利点とは 1. 異なるDBの違いを吸収してくれる DBの種類によらず,同じソースコードで操作できるので,複数のDBを併用する場合や,DBを変更する場合にも,コードの書き換えの必要がない. 2. SQLを書かなくてもよい MySQLや,SQLite,PostgreSQLなどのDBを操作するにはSQLを使うが,SQLAlchemyを使うと,SQLを直接記述することなしに,DBを"Pythonic"に操作できる. SQLAlchemyの使い方 簡単な流れとしては,どのDBにどうやって
Flask内でのSQLAlchemy(SQLAlchemy in Flask) SQLAlchemy in Flask¶ 多くの人がデータベースへのアクセスにSQLAlchemyを好みます。以下の例ではflaskアプリケーションでモジュールの代わりにパッケージを使用し、(データベースの)モデルを(アプリケーションとは)別のモジュールに落とし込む(パッケージにした大きなアプリケーション(Large Applications as Packages))ことを推奨しています。それは必須ではありませんが、とても理にかなっています。 Many people prefer `SQLAlchemy`_ for database access. In this case it's encouraged to use a package instead of a module for your flask
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く