-
posts
-
Kubernetes Health Checks in Django
In a previous post I wrote about Kubernetes health checks. Since I’m a Python developer and a fan, I went about implementing it in Django. Health checks are a great way to help Kubernetes help your app to have high availability, and that include...
-
A Quick Look at the Kubernetes Python Client
For those of you that don’t know there is a new Python API client in the kubernetes-incubator project: client-python. There has been some high quality Python clients like pykube, but client-python can serve as the official Python client.
The Stru...
-
Kubernetes Python クライアントを使ってみる
この記事は pyspa Advent Calendar 2016 の第2日目の記事。第1目はakisuteさんの「今年の話」だった。
「斧さんの記事凄かった。pyspa の二日目の人まじかわいそう」というかわいそうなイアンです。よろしくです。
私はGoogleに入ってもうすぐ2年が...
-
PyCon JP 2016に参加してきました
今年のPyCon JP で Tensorflowについて発表させていただきました。私は台北の出張があって今年のPyCon JPで2日目しか参加できなくて残念でしたが、今年は過去最高のPyCon JPだと感じていました。PyCon JPのスタッフの皆さん、本当にお疲れ様でした! 私は数年間イベン...
-
Testing Django Views Without Using the Test Client
The normal way to test Django views is via the test client. The test client fakes being a wsgi server and actually makes an HTTP request through all of Django’s request routing machinery. There are a number of reasons why this isn’t an ideal appro...
-
Pickling Objects with Cached Properties
Python descriptors allow you to create properties on python objects
that are the result of executing some code. One of the simplest ways of doing
that is using the @property decorator. Here, accessing the myprop will
call the method and return the...
-
PyCon JP 2014 の感想
この記事は大分遅いけど、PyCon JP 2014 が先週末に無事終了しました!
今年は今まで、最大 545 の参加者がいました。とても楽しかった。参加した皆様、
ありがとうございます!
第3回 の運営レポートで
説明しているけど、今年、僕はメディアチームのリーダーとして
務めてきました。 ...
-
HTMLサニタイズするライブラリbleachを試してみた
最近にHTMLををサニタイズしてくれる便利なライブラリ bleach を見つけた。HTMLを受け取ってウェブ上に表示したいんだけど、
危険なやつをエスケープするもしくは消したいって場合に使うものだ。特にWYSIWYGエディターで入力されたHTMLとか
html5lib を使っているから、閉じ...
-
New Year’s Python Meme 2014
Since everyone else was doing it I thought I’d write one up too.
What’s the coolest Python application, framework or library you discovered this year?
Luigi: A data processing pipeline framework written by some folks at Spotify. I gave a talk...
-
App Engine Pull Queues and kombu
App Engine provides a pull queue API
for accessing, leasing, and processing tasks outside of App Engine. You might
do this to perform long running tasks that aren’t suited to App Engine’s
infrastructure. Or you might want to use a library or syste...
-
PyCon APAC 2013
PyCon APAC 2013 is over! I want to thank
everyone who helped make the conference a great success. Staff,
speakers, attendees alike all contributed to making PyCon APAC 2013 the
best PyCon in Japan ever.
</assets/images/710/2013-09-14_08.11.0...
-
Google App Engine 1.7.7 pre-release
Note
**Update:** App Engine 1.7.7 final has been released and is available
here: <https://developers.google.com/appengine/downloads>
The App Engine 1.7.7 pre-release SDKs were
released
about a week ago and I finally got around to...
-
Django で Amazon SES を使う
Amazon さんが、Amazon Web Services の下にメール送信サービス Simple Email Service
(SES) を
提供している。このサービスは、主に大量なメールでも正しく送信して、
メールがちゃんと届くようにサービスを提供している。
connpass ではメー...
-
Riak を Python で使う
Riak は Basho が作っているキーべリューストレージ (KVS) システム。 せっかく
Riak Meetup Tokyo に参加しているっていうことを
きっかけにして、Riak を Python から使ってみよう。
インストールなど
Riak をインストールするにはちょっと面...
-
パーフェクトPythonは本日から発開始!!
僕が執筆に参加していた「 パーフェクトPython
」は本日から発売されます!
私は僅かな2章~4章を担当させて頂きましたが、一時期かなり大変でした。本を書くにはいろいろ難しいということがわかりました。 shoma
さんの記事
の「事の発端」を読むと書く大変さが感じかもしれない。ま、大変...
-
Administer WordPress using Django's Admin
I recently came across one feature of Django that seemed pretty useful
for one off projects and customizations and was startled because it’s
one of Django’s least mentioned features. In fact, I’ve been using
Django at work for over 5 years now and...
-
Mixins and Python
Python supports a simple type of multiple inheritance which allows the
creation of Mixins. Mixins are a sort of class that is used to “mix in”
extra properties and methods into a class. This allows you to create
classes in a compositional style.
...
-
A Japanese Python Community Who's Who
There is a small but growing Python community in Japan. Many people,
even some of those Python enthusiasts who living in Japan, are unaware
of this and don’t know who any of these people are. There are a lot of
reasons for this but the number one ...
-
AE35 IS NOT IMPRESSED
僕が作った appengine アプリ http://ae35notimpressed.ian-test-hr.appspot.com/
はもう見ているかもしれませんが、何で作ったか、どういう意味なのかがわからない人が多くて、ちょっとブログで説明しようかなと思って、書いてみた。
PyFesか...
-
Django 1.5 の紹介
この記事は 2012
Pythonアドベントカレンダー(Webフレームワーク)
の第3目の記事。昨日の記事は id:shomah4a の「 2012 Python アドベントカレンダー (Web フレームワーク ) 二日目
WSGI でなんか作ってみる 」。明日は surgo
さんが...
-
Python でPassbookファイルを作成する
最近、iPhoneのiOS6でPassbookという機能が出ました。Passbookはイベントのチケットや、飛行機や船の搭乗券や、クーポンや、ポイントカードを管理出来る地味に便利なアプリ。
僕は興味があって、Pythonでどう作るかを調べてみたので、ここで共有しようと思っている。Passbo...
-
gevent ベースのサービス指向サーバーを作る
非同期サービスフレームワーク ginkgo
(docs) というものが今年の PyCon US
で発表された。サービスを作るには、デーモン化なり、PIDファイルの作成なり、シグナルの処理なり、プログラムでやらないといけないことが多い。
Twisted フレームワークだと、サービスまわりの機能が...
-
Djangoの DateTimeField の auto_now と auto_now_add
Django の Model の DateTimeField に auto_nowと auto_now_add
というキーワード引数があります。この引数はデフォールトで False になっていますが、
True にすると、 モデルのインスタンスを保存するタイミングで更新されます。
auto_n...
-
Redmine で reStructuredText を使う方法
我々BeProudのRedmineのWikiやチケットの説明文やチケットのコメント文にはReStructuredTextを使っている。RedmineのデフォルトのTextileはPythonが好きな弊社で使うのは以ての外。なので、ReSTを使うようにした。そして、生のReSTしか使わなければ、...
-
Django's contrib.auth and django-newauth
Recently there have been a lot of conversations on the Django mailing
list about fixing the auth module. Here are some of the recent mailing
list threads:
authentication by
email
auth.User refactor:
reboot
auth.User: The abstract base clas...
-
Python Sets
I had an application with two lists of unique items that I wanted to
take the intersection of. I had figured that using a python set would be
faster but I didn’t realize that it would be faster than the simple list
comprehension by this much.
~$ ...
-
Python のセットがすごい
Python のセットを使ったほうが速いだろうとおもったんですけど、こんなに差がでると思わなかった。
~$ python -m timeit -n 1000 "[x for x in range(1000) if x in range(500, 1500)]"
1000 loops, bes...
-
Pycon JP 2011 was Awesome!
_
On Saturday we held our first Python JP 2011. We had approximately 230
people show up which I think is great for a first time Python conference
in Japan. I want to thank all of the members of the planning committee,
staff, and attendees for suc...
-
Pycon JP 2011 開催しました!
_
スタッフとして、楽しい楽しいPyconJP に参加しました。 今回、約200人の Python プログラマーを集めることを成功しました。 本当に
Python に興味がある方がいっぱい来てくれて、楽しくて、素晴らしいイベントができました! 嬉しかったです。
皆さんのお陰で、楽しいイベント...
-
Pycon JP 2011
_
The Python Programming Language community in Japan will be having our
first Pycon JP on August 27th at the Advanced Institute of Industrial
Technology (産業技術大学院大学) in Tokyo’s Shinagawa Seaside.
Pycon JP started in the aftermath of Pycon APAC 20...
-
Flask で LDAP でパスワード変更アプリを作る
この間、会社で少し大きくなって、利用するツールが少し増えつつありますので、
ユーザー管理を統一するために、LDAPサーバーを使うようになりました。
思ったより面倒だったんですが、LDAPを使うと色なサービスで同じ ユーザー名とパスワードが使えるので便利です。今のところ、 Redmine
サー...
-
App Engine 1.5.0 がリリースされました
App Engine 1.5.0 のリリースはかなり大きくて、 App Engine
はもっと広い範囲でホスティングプラットフォームになりつつありますね。
1.5.0 は下記のリンクでダウンロードできる。
http://code.google.com/appengine/downloa...
-
PYPI を使わないでデプロイする方法
pip、buildout などを使うとデプロイする時に Python ライブラリの依存関係はややこしいことがあります。
普段はデプロイスクリプトで、 pip に requirements.txt
を指定して、もしくは、 buildoutを実行して、 依存ライブラリを落としてインストールしますが...
-
Google Appengine 1.4.3 リリースされました!
Google Appengine 1.4.3
水曜日に Google Appengine 1.4.3 がリリースされました! 1.4.1 と 1.4.2 はブログ記事を書くほど
大きくはなかったのですか、 1.4.3 はまたいろいろ入っているので、ご紹介します。
Prospective S...
-
Python の JSONライブラリのパフォーマンステスト
概要
最近、あるお客さんから、 快速なので、 cjson
を使おうという要望をいただきましたが、 以前、僕は cjson
は色なエッジケースの処理が微妙と分かっていて、実際に他のライブラリより早いのかなと思いました。
cjsonのPyPiページ
いろなコメントが書かれています。しかも、 最新...
-
Kay 1.1 リリースしました!
Kay チームは Kay 1.1 をリリースしました! 松尾さん、Daskalou さん、末永さん、鈴木さんのヘルプに感謝しています。
Kay は Appengine 専用フレームワークです。基本的なデザインは Django フレームワークを基にしています。
Kay 1.1 は新しい機能が...
-
Kay 1.1 Released!
The Kay team just just released Kay 1.1! I want to thank Takashi
Matsuo, Nickolas Daskalou, Tasuku Suenaga, and Yosuke Suzuki for their
hard work on this release.
Kay is a web framework made specifically for Google App Engine. The
basic design of...
-
Python Hackathon 2011.02
Python Hackathon 2011.02 に参加しに行ってきました。今回は、ちょっと遅く着いたが、楽しかった。
やったことはほとんどプレゼンの準備でした。発表したのは、Twistedで作られたロングポーリングチャットサーバの作り方についてでした。
Twisted ロングポー...
-
PyCon Mini JP 「お前、誰よ」まとめ
昨日、 PyCon Mini JP にSphinx 1.1 の i18n 機能について発表しました。 Python コミュニティの偉い石本さんが 日本の Pythonコミュニティの歴史について、いいキーノートを発表してくれたけれども、いろなPython 開発者がみんな集まる PyCon みたい...
-
An introduction to the Tipfy Framework for Appengine
(This post is the English translation of the Dec. 24th edition of the
Python Web Framework Advent
Calendar 2010. Other posts can be found
at: http://atnd.org/events/10465 though they will be in Japanese)
I usually use the kay
framework for Appeng...
-
Google Appengine フレームワーク Tipfy の紹介
(この記事は Python Web フレームワーク
アドベントカレンダー2010
のために書いた 12/24 の記事です。 他の記事を読むには http://atnd.org/events/10465
をご覧ください)
私は普段、 kay フレームワーク を使いますが、最近、
Tipfy (...
-
Google Appengine 1.4.0 Released!!
Google Appengine 1.4.0 was just
released and has lots of interesting new features. Channel API, “Always
On” (reserved instances), Improvements to background processing, Warm up
requests, and Metadata queries just to name the big ones.
Channel API...
-
Google Appengine SDK 1.4.0 がリリースされました!
Google Appengine 1.4.0 がリリースされました!!
このリリースはかなりでかい!! チャンネルAPI, “Always On”
(リザーブインスタンス)、タスクキューの正式リリース、スタートアップリクエスト、バックグラウンド処理の改善などなど、
チャンネルAPI
まずは...
-
New Google Appengine API Expert
Yesterday I became the new Google Appengine API
Expert (Python)
for the Japan region. Google Experts are the equivalent for Google API
Gurus as they are called in the ‘States. I will be helping out other
developers in Japan to learn about and ...
-
Google Appengine 公認API エキスパートになりました!
昨日のAPIエキスパート月例会で、私は Google Appengine 公認API
エキスパート
(Python) になりました。私は2年ちょっと前、ずっと仕事で Python や、Django
を使っていて、Appengine
も最初のリリース直後の Google Develope...
-
bpssl - The Django SSL Support Application
The other day I released bpssl which is a Django application that helps
you support HTTPS on your website. The main functionality is performing
redirection for HTTPS only URLs and views. For instance, if a request
for your login view ‘/login’ is r...
-
bpssl のDjango SSL対応アプリをリリースしました
今日、 bpssl をリリースしました。bpsslは BeProud で欲使っている
Django用のSSL対応アプリです。 アクセスする時にHTTPSが必須なURLを指定することがよくありますよね? 例えば、
ログイン画面をHTTPSでしかアクセスできないようにする。ただし、 HTTPでアク...
-
Appengine Matcher API
Matcher APIはあるオブジェクトが登録したクエリーにマッチするかをスケーラブルにチェックしてくれるサービスです。
クエリーが既に登録しているから、あるオブジェクトが一つ一つの登録したクエリーにマッチするかが他のクエリーに依存しないので、
Map-Reduce
で簡単に平行で処理を分担し...
-
Cron only decorator for appengine
For a recent project I recently I have been using appengine’s cron
feature to aggregate data and perform maintenance tasks. However, since
cron is a simple web request, if a user accesses that url then the cron
job will run. In order to prevent no...
-
Google Appengine 1.3.8リリースされました!
Google Appengine 1.3.8 がリリースされました!
今回のリリースは、いろな面白い機能が入ってきた。
ハンドラー
appstats や、データストアの管理画面、リモートAPIのハンドラーが簡単に設定できるようになりました。
builtins:
datastore_...
-
Dynamically Adding a Method to Classes or Class Instances in Python
In Python you sometimes want to dynamically add methods to classes or
class instances (objects). In Python code, the most obvious way to
accomplish this might be something like the following but it has one
caveat,
class MyObj(object):
def __i...
-
BPStudy #37
昨日、BPStudyで、 Djangoアプリの実践的設計手法について発表をしました。
スライドをSlideshare にアップした。
Djangoアプリの実践的設計手法</embed>View more presentations from Ian Lewis.
-
Pythonでメソッドをクラスまたはインスタンスに動的に追加する
Pythonでは、あるクラスもしくは、クラスインスタンスに動的にメソッドを付けたいことがあります。Pythonコードでは、一般的に考えるとこういう風に書くって思いがちだけど、
class MyObj(object):
def __init__(self, val):
...
-
特定なDjangoモデルを別DBに保存するメモ
今日、会社で特定なDjangoモデルを別のDBに保存するようなニーズがあって、Django マルチDBを使えるかなという話がありました。
この間、
Django1.2のマルチDBはレプリケーション対応に微妙
っブログに書きましたけど、ModelでDBを使い分けるのができるはずと思って、DBルー...
-
Fabric デプロイツールのPythonicな書き方
Pythonで作られたデプロイ・自動化ツール Fabric
があります。デプロイスクリプトなどをPythonで書くことができます。最近、
Fabric で結構複雑なこともしたかったんですけど、 Fabric のAPIが結構
Python的で楽だったので、みんなに共有しようかなと思いました。
...
-
Django アプリサーバ、gunicorn と fastcgi の比較
概要
最近、会社では、fastcgi より、 gunicorn を使うのがどう?
といわれました。gunicorn を触ったことない僕は fastcgi
のロードテストも実際やったことなくて、メソッドについて、(prefork
がいいか、 threadedがいいか) の読んでいたものを元...
-
Google App Engine 1.3.6
今日、 Appengine 1.3.6
がリリースされました。今回の大きいなリリースは以下の4つです。元のブログポストは
こちら
1. データの名前空間API
これは結構おもしろくて、データを名前空間を使うと、ユーザーのデータを完全に分けることができる。たとえば、xxx.jp と yyy....
-
Python 温泉 (夏 2010)
Python 温泉 in 熱海に行ってきました。ま、まだ熱海の旅館なんだけど、早速 Blog を書こうと思っていました。
結構いい感じで、進んで来ました。会社の AE35 、 と
akisutesama と電車に乗ってきました。電車の中、ずっと
iPhone 触りつつ
増田さん が...
-
Python StringIO と cStringIO のもう一つの違い
C で作られた cStringIO は ピュア Python で作られた StringIO
モジュールと違うのをみんな知っていると思いますけど、今日、私が知らなかった違いをもう一つ見つけました。
StringIO では、StringIO のコンストラクターに文字列を渡せば、その文字列に書き込...
-
Key Value Storage Systems ... and Beyond ... with Python
Google docs wouldn't let me share the presentation publicly with people outside our company's domain and it gave me an error when I tried to download it as a Powerpoint file or PDF so I was forced to recreate my presentation locally. Anyway, I pla...
-
Django 1.2 マルチ DB と master/slave レプリ
Django 1.2 はマルチDB対応ができまして、master/slave
レプリにも対応しているのですが、詳しく見るといろな問題が出てきます。
Django 1.2 のマルチDB対応は
どのDBから、読み込むか、どのDBに書き込むかがDBルータで決める。しかし、そのルータで決める時点でリ...
-
Django 1.2 の変更のまとめ
先週、 Django 1.2 が出ました。新しくて、良い機能がいっぱい入っているけども、1.1 からの変更をご紹介しようかと思っています。
マルチDB
1.2 では、一番大きい変更は明らかに
マルチDB対応
ですね。 settings.py の DATABASE オプションは DATABA...
-
mercurial .hgrc include
僕は 僕のシェル環境設定ファイル をbitbucket で管理している。
新しいサーバーで作業する時にこのレポジトリからクローンして、ファイルを設定するけど、ローカル環境のみの設定が必要な場合が多い。今まで、bashrc等のスクリプトの中でローカル設定ファイルがあれば、sourceして、適用し...
-
ipython と virtualenv を同時に使う方法
概要
python の皆さんはみんな使っている ipython は virtualenv を使う時に virtualenv
に入っているモジュールをインポートできないことが起こります。 ipython は特に
virtualenv に対応していないわけです。 ipython をグローバルじゃ...
-
python-openvcdiff and Cython
I started a project today to implement an interface for the
open-vcdiff using
Cython. I’m not a C++ master and the Python C
libraries are pretty new to me but I managed to expose and implement a
few methods of the VCDiffEncoder class. The hardest ...
-
何でObjective-Cが好きじゃなくなったの?
今日、 Facebook iPhone アプリの作者 Joe Hewitt
の発言がtwitterに流れた。
joehewitt: I think for a while there I
was actually convinced that I liked
Objective-C.
(Ob...
-
growltestrunner の pynotify 対応 / pynotify の使い方
最近、会社の AE35 さんが
growltestrunner を作っていて、
modipyd
を使って、ファイルを更新したタイミングで自動テストを自動的に実行してくれて、growlで通知するように素敵な環境を設定した。
俺はlinuxなので、当然 growl がないけど、Mac OS の ...
-
BPStudy #29 テスト駆動開発
BPStudy #29 のテスト駆動開発の話でペアプログラミングで、Last Recently Used キャッシュ
(LRU)を自動テストやりながら、実装しようという部分がありました。
最初に僕は二つのリストで10分くらいで実装したんですけど、やっぱりパフォーマンスが出ないと思ったから、時...
-
pytyrantはpython-tokyotyrantよりずっと速い
夏のPython温泉 で Bob様 が作ってくれたピュアーパイソンクライアント pytyrant は 酒徳さん の python-tokyotyrant より速いという話を 聞いたと moriyoshiさん に言った。それで、moriyoshiさんはprofileのテストを作ってくれたけど、結...
-
Parsing email with attachments in python
Recently I needed to be able to parse out attachments and body from
multipart emails and use the resulting data to post to a service. So I
wrote the code below to parse out text and html portions of the email
and also parse out attachments.
The c...
-
pyawsの使いにくい部分
AmazonのアフィリエイトAPIのpython クライアント pyaws は単純にpythonオブジェクトを持つ Bagクラスがある。
# Wrapper class for ECS
class Bag :
"""A generic container for the python...
-
virtualenv, virtualenvwrapper, pip を使う方法
あるプロジェクトの依存は特定なバージョンじゃないとダメな場合が結構多いと思いますけど、最近、pythonの仮想環境を簡単に作れるようになりました。virtualenv
と virtualenvwrapper と pip の組み合わせを紹介します。
virtualenvは環境を作ってくれるライ...
-
Python温泉 06/2009
<http://art13.photozou.jp/pub/703/167703/photo/22858223_thumbnail.v1246121123.jpg>
<http://art13.photozou.jp/bin/photo/22858223/org.bin?...
-
明日からPython温泉
明日からPython温泉に参加しに行ってきます。課題は下記のとおり
django-lifestream
の整理
disqus-api-client
の実装
homepage のバグを直す
Appengine
上のコードスニペットのウェブサイトのまとめ
Google An...
-
Python 例外のひどい仕様
Pythonの例外オブジェクトは苦手です。例外のメッセージが何でもasciiとして扱われることがひどい。
In [1]: t = ValueError("テスト".decode("utf8"))In ...
-
GAE Hackathon Disc. 3 全文検索
GAE Hackathon Disc. 3 に参加してきました! 私とid:a2c (Twitter) がGoogle Appengineの日本語が対応する全文検索エンジンを作ってみました。
GAE では、データストアが Entity と言う概念で作られてるけど、Entityを検索する時に、...
-
Transactions on Appengine
The way to store data on Appengine is with Google's BigTable Datastore which has support for transactions. However, the transactions are quite limited in that,
You can only execute callables inside transactions. Which means you basically call ...
-
Werkzeug and reverse urls
I wanted to impove a Google Appengine application that a friend of mine created (ほぼ汎用イベント管理ツール(jp)) and noticed that he was redirecting directly to urls. He is using Werkzeug to handle url routing so I wondered if there was a method for generating...
-
Werkzeugのreverse URL処理
ほぼ汎用イベント管理ツールの改善をしようと思ってて、実際にコードを見るとURLを使ってるのが気になった。
WerkzeugのURLルーティングでDjangoのreverse関数みたいにURLの名前からURLに変換できるのかなと調べて、ある方法がありました。名前からじゃなくて、endpoint...
-
QueryDict and update()
Yesterday I ran into an interesting quirk with Django's QueryDict object and the normal dictionary update() method. Normally the update method will allow you to merge two dictionary or dictionary like objects but because the QueryDict internally h...
-
OpenSocial Hackathon @ デブサミ
昨日、デブサミ版のOpenSocialハッカソンに参加してきた。結構コーディングができて効率な一日でした。
写真を撮るのを忘れちゃったけど、最初にキーノートプレゼンをして(なぜか英語だった)、それからコーディングに入って、最後に作った物を発表する形になった。コーディングする人はテーマ毎にグル...
-
Field/column Queries in Django
One of the neat things making it's way into Django 1.1 is F object queries. The F object is kind of like the Q object as it can be used it queries but it represents a database field on the right hand side of an equality/inequality.
For the exampl...
-
Google Appengine SDK 1.1.8がリリースされました
Appengineの新しいリリース1.1.8が来た。色な面白いところがあるけど、仲居さん(id:Voluntas)のブログポストからピックアップする。
ByteStringProperty が実装 気軽に使える BlobProperty
UserProperty に auto_curre...
-
Python date range iterator
I couldn’t find something that gave me quite what I wanted so I created
a simple Python generator to give me the dates
between two datetimes.
def datetimeIterator(from_date, to_date):
from datetime import timedelta
if from_date > to_da...
-
Introduction to Algorithms
Today my copy of Introduction to Algorithms came in the mail (a gift from the family). I've decided, mostly inspired by Peteris Krumins to revisit classic algorithms as it's been a while since I've taken a look at them.
I have decided to als...
-
Google Appengine Hackathon 第2回
今日、Google Appengine Hackathonに参加してきました。今回は岡野さんと共にDjangoの上でモバイルフレームワークを作成する引き続きを行いました。今日は絵文字と文字コードの対応を続けました。岡野さんがほぼ絵文字と文字コードの対応を以前にやってくれたので、今日は僕はapp...
-
feedparserで、media コンテンツを取る
feedparserで、どうやってビデオを取れるかをずっと悩みましたけど、今日少しだけ、進展した。問題の核心はyoutubeや、vimeoは Yahoo! RSS モジュールを使って、RSS拡張ネームスペースにデータを入れている。この拡張データの処理はfeedparserが中途半端でやってる。...
-
Django サイトマップ フレームワーク
Django sitemap frameworkを使うのが簡単過ぎる。下記のようにサイトマップクラスを作って、urls.pyに登録するだけ。サイトマップに載るURLを取るのに、サイトマップフレームワークが自分が作ったクラスのitems()を呼び出して、アイテムのget_absolute_url...
-
Django Sitemap Framework
Using the Django sitemap framework is so easy it's almost no work at all. Just make a sitemap object and add it to the sitemap in urls.py. The sitemap framework calls items() in your Sitemap to get the list of objects to put in the sitemap and the...
-
Django admin inline forms
For my new project dlife (Update: Now django-lifestream), I went about implementing a simple comments interface that would allow users to make comments on imported feed items. I wanted to support this in the admin in the typical manner such that w...
-
DjangoGraphviz
今日、Djangoアプリケーションのモデルの構成を分かりやすく見たくて、モデル構成からGraphviz ドットファイルを生成できれば、いいなと思って、DjangoGraphvizを見つけた。ただ、ここからダウンロードして、こう実行する。
PYTHONPATH=$PYTHONPATH:. DJA...
-
初出勤日
新しい会社に入って、初出勤日が無事に終了しました。結構いい感じでした。前の会社では、狭いとこに住み、残業してたりしてて、電車が込んでて、二年間結構苦しんで仕事してたんです。今はもう広いマンションで住んでて、会社の人がゆっくりで仕事してて、電車も空いてて、PythonとDjangoで仕事できて、...
-
Feedparser and Django
Over the weekend at Python Onsen I worked on a lifestream web application using Django and feedparser. I was really impressed with how simple feedparser is to use and how easy it is to get unified results from atom or rss feeds. You simply import ...
-
Python Onsen Oct. 2008
Last weekend I went to my second Python Onsen[jp] organized by Nakai-san(id:voluntas). I talked about Python Onsen in my first blog post here. Python Onsen is a 3 day event (Fri, Sat, Sun) but as before I only participated on Saturday and Sunday. ...
-
Python温泉
先週末、 Python温泉第4回に行ってきました。Python温泉は金土日なんですけど、前回と同じく土日、1泊にやってきました。今回は集中できたけど、前回より友達つくりや、会話ができてなかったという感覚だった。いろいろ寂しかった。でも、ビープラウドのid:tokibitoさんと、jQuery...
-
ウェブホスティング移動
最近PythonやDjangoの開発をだんだんやっていてる僕が、このサイトを新しいウェブホスティングプロバイダーに移動することにした。 今は Haswebという安いプロバイダーなんですけど、Pythonにあまり相性がよくないので、Pythonアプリをサーバーに動かすのが難しすぎる。 簡単なPy...
-
jsonschema 0.2 alpha
I just released a new version of jsonschema 0.2 alpha over at http://code.google.com/p/jsonschema
The source can be downloaded here: jsonschema-0.2a.tar.gz The documentation can be found here: jsonschema (version 0.2a) documentation
The new releas...
-
jsonschema ヴァリデーター 0.1a
昨日、JSONSchema ヴァリデーターを漸くリリースしました。XML Schema と同じようなJSONSchemaは JSON文書の構造が正しいかどうかを検証するための文書。さらに、jsonschema ヴァリデーターはそのJSONSchema文書に従ってJSON文書が正しいかどうかを検...
-
jsonschema mentioned on json.com
Kris Zyp (the author of the JSONSchema proposal) mentioned jsonschema on his blog at json.com. Thanks Kris!!
-
JSON Schema Validator 0.1a for Python
I just released the first version for a project that I've been working on since the Python Onsen. It's a validator for JSON Schema written in Python. It's based on the JSON Schema Proposal Second Draft.
The source can be downloaded here: jsonsche...
-
Django
I was thinking about using Django for one of my projects on GAE because it seems like a popular project and somewhat easy to use, but I'm not quite understanding yet why it's better to have helper functions rather than controller/handler classes l...
-
Python Planet Japan 登場!!
今日、Python温泉に参加したメンバーたちや、Pythonが好きな皆様のブログポストを集めるPlanetホームページがあれば、いいなということで、作ってみました。
では、Planet Python Japanを登場します。
Pythonが好きな皆様へ、Python Planet Japan...
-
Protocol Buffers
A few days ago Protocol Buffers was released by Google as an open source project. Protocol Buffers is a way to generate code for objects that can be serialized to and de-serialized from the protocol buffers binary format. An implementation of the ...
-
Python Onsen
</assets/images/gallery/dcf_0207_thumbnail.jpg>
</assets/images/gallery/dcf_0207_thumbnail.jpg>
This weekend I went to the Python Onsen (Japanese) organized by
Voluntas. Python Onsen is an event
where people who like or are intere...
-
Google Developer Day 2008
Google Developer Day Japan 2008 is being held on June 10th at Google's offices in Shibuya and I've registered to attend this year. There were a number of sessions that people could take part in but I decided to register for a Google appengine hack...