You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
WSGIからの流れを大まかに掴めたのでまとめたい。 かなり大まかには、この画像を念頭におけばいいと思う。 今回はDjango1.4を対象にしている。 注意 流れを理解するために読むべきソースコードへのリンクと、その順番をまとめてる。 読みやすさはあんまり考慮してないし、細かな解説はしてない。 ソースコードの読むべき順番をメモっておきたいだけ。 DjangoのView まず簡単に触れておきたいのがDjangoのView。 Viewとは リクエストを受け取る レスポンスを返す 呼び出し可能である オブジェクトのことで、このViewがリクエスト->レスポンスの末端となっている。 冒頭の図がわかりやすいと思う。 あとはチュートリアル。 はじめてのビュー作成 クラスベースビューの場合、流れが複雑になるからそれはそれで別の機会にまとめたい。 https://github.com/django/djan
Chaussette WSGI Server¶ Chaussette is a dead-simple WSGI server that can run against already opened sockets. The main use case is to delegate the processes and sockets management to Circus. Usage¶ Chaussette provides a console script you can launch against a WSGI application, like any WSGI server out there: $ chaussette myapp Application is <function myapp at 0x104d97668> Serving on localhost:8080
Circus is now able to bind and manage sockets, and in cunjunction with Chaussette you can run a full web stack behind your favorite Web Server (Nginx, Apache etc.) -- read more about Circus stacks here. In other words, Circus can spawn as many Chaussette processes as you want, each one will act as a web worker: they'll all accept requests on the same socket. Why would you want to do this? Because
Contributing¶ Found a typo? Or some awkward wording? Want to add a link to a presentation, a tutorial or a new (or old and missing) WSGI-related tool? Fixing a dead link? WSGI.org is open-source and hosted on github, contributions are encouraged and appreciated.
WSGI (Web Server Gateway Interface) は Django や Google App Engine を始めたくさんの Python Web フレームワークが準拠している仕様で、これについての秀逸なチュートリアルの翻訳。日本語訳が秀逸かどうかは知らないので、怪しい部分は原文にあたって教えてください。 WSGI ことはじめ ==================== 著者(Author): Armin Ronacher 原文(Original Text): http://lucumr.pocoo.org/articles/getting-started-with-wsgi 翻訳(Japanese Translation): hkurosawa ライセンス(Lisence): http://creativecommons.org/licenses/by-nc-sa/2
はじめに こんにちは、Python界の情弱クレイジー野郎です。この間Armin Ronacherが書いたWSGIに関する記事から、あちこちでWSGIに関する議論が起きてますが、とりあえずその返答記事として書かれたWSGI Liteに関する記事を訳しました。 WSGI Is Dead: Long Live WSGI Lite! (dirtSimple.org) WSGI Is Dead: Long Live WSGI Lite! ほぼ10年前、Web-SIGにはじめてWSGIのアイデアを提案したときに遡ると、WSGIがどう「フレームワーク分解機」になり得るかということに対して、私はいまよりもずっと理想主義的な展望を期待していました。すべてがプラガブルで、モノリシックなアプリケーションフレームワークを持つ理由がもはや一つもないような未来を思い描いていました。すべてライブラリ、ミドルウェア、デコ
WSGIとは PythonでWebアプリを作るときに必ず出てくる単語にWSGIがあります。 WSGIとは、Web Server Gateway Interface の略で、WebサーバーとPython製Webアプリを つなげる標準インタフェースです。 WSGIの上で動くようにアプリケーションを作ると、そのアプリケーションは修正無しに Apache+mod_wsgi, Apache+mod_python, fastcgi, scgi, cgi, 等の環境で動かせるように なります。 他にもミドルウェアという考え方があります。例えばOpenID認証機能をWebフレームワークの プラグインとして開発した場合では他のWebフレームワークでは利用できないのですが、 WSGIミドルウェアとして開発すればWebフレームワークを問わずに利用できるようになります。 標準ライブラリのwsgirefモジュール
"mod_python 終了のお知らせ" を受け、もともとリソース不足だった既存の Django アプリケーション郡のサーバをリプレイスすることにしました。リプレイス要件↓ パフォーマンスが高いのにしたい アプリケーションの変更は必要最小限にしたい URL 類は既存のアプリケーションを引継ぐ: 複数プロジェクトをサブディレクトリーで運用していて、 "django.root" で複数プロジェクトを切り分けている 環境設定について これは apache - mod_wsgi が簡単すぎます。 nginx - fastcgi nginx - fastcgi 構成の場合は、init.d への登録、 daemontools を利用 (弊社は mod_python 以外はこれ)。 nginx の設定 /etc/nginx/fastcgi_params fastcgi_read_timeout 180;
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy. Installation Here's a quick rundown on how to get started with Gunicorn. For more details read the documentation. $ pip install gunicorn $ cat myapp.py def app(environ,
Error message : Directory is not found or not writable (DATA_DIR) Directory is not found or not writable (DIFF_DIR) Directory is not found or not writable (BACKUP_DIR) Directory is not found or not writable (CACHE_DIR) Site admin: ohneta PukiWiki 1.5.1 © 2001-2016 PukiWiki Development Team. Powered by PHP 7.3.0. HTML convert time: 0.001 sec.
phpで開発する時の開発用サーバとかよくわからなかった。 未だにapacheとか云々するのもなんだかなあと思うんだけど。 まあpythonistaならwphp使うよねって話。 wphp http://pythonpaste.org/wphp/ こいつはwsgiのインターフェイスでphpをfastcgiで動かしてくれる。 from wphp import PHPApp from wsgiref.simple_server import make_server my_php_app = PHPApp('/path/to/php-files/', php_options={'magic_quote_gpc': 'Off'} ) httpd = make_server('', 8000, my_php_app) httpd.serve_forever() とまあこれでOK。 でもデフォルトでは基本
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く