holly's wiki hollyさんのwiki トップページページ一覧メンバー掲示板編集 python sqlalchemyねた 最終更新: kurt0027 2011年04月17日(日) 23:50:29履歴 Tweet O/R Mapper。これがメジャーらしい。http://www.sqlalchemy.org ほかにElixirというのもあった 環境設定 DB psycopg2と同じ。ちなみにmysqlで使う場合は自分の環境では以下でセットアップした sudo yum -y install mysql mysql-devel # python virtualenv activate. yumでインストールでもいい pip install MySQL-python table定義 こんな感じでテーブルごとのしておくみたい from sqlalchemy import Table,
from sqlalchemy import Column, Integer, String, Text, DateTime from flaski.database import Base from datetime import datetime class WikiContent(Base): __tablename__ = 'wikicontents' id = Column(Integer, primary_key=True) title = Column(String(128), unique=True) body = Column(Text) date = Column(DateTime, default=datetime.now()) def __init__(self, title=None, body=None, date=None): self.title = tit
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く