CherryPy

CherryPy は、Pythonプログラミング言語を用いたオブジェクト指向のWebアプリケーションフレームワークである。

CherryPy
CherryPy
開発元 CherryPy team
最新版
ウィキデータを編集
安定版
18.10.0[1] / 2024年6月15日 (2年前)
リポジトリ ウィキデータを編集
プログラミング
言語
Python
対応OS クロスプラットフォーム
種別 Webアプリケーションフレームワーク
ライセンス BSD License
公式サイト cherrypy.dev
テンプレートを表示

CherryPy は、Pythonプログラミング言語を用いたオブジェクト指向Webアプリケーションフレームワークである。

HTTPプロトコル(Adapterで)ラップすることによるWebアプリケーション素早い開発を目的として設計されている。しかし、低レベルの位置にとどまり、RFC 2616で定義されている以上の機能は提供しない。

CherryPy は Web サーバそのものとして動作することもでき、また(Apache 2 などを含む)WSGI環境であれば、外部から起動させることもできる。CherryPy は、出力を表示させるためのテンプレートや、バックエンドへのアクセス、認証プロトコルなどの処理は行わない。フレームワークは、7つの関数をもつ簡潔なインタフェースからなるフィルターによって拡張可能である。これらは、リクエスト/レスポンス処理中の定義された場所で呼び出される。

Python インターフェイス

プロジェクトの創設者Remi Delonの目的の一つが、CherryPy を可能な限りPythonらしくすることであった。これにより開発者がこのフレームワークを標準の Python モジュールとして使用することができ、(技術的な観点からは)アプリケーションが web 用であることを忘れることができる。

たとえば、よくある Hello World は CherryPy では以下のようになる:

import cherrypy

class HelloWorld(object):
    @cherrypy.expose
    def index(self):
        return "Hello World!"

cherrypy.quickstart(HelloWorld())

関連書籍

関連項目

  • CherryTemplate - CherryPy 向けのテンプレート言語
  • TurboGears - CherryPy は TurboGears の主要コンポーネントである

参照

  1. ^ Release v18.10.0” (2024年6月15日). 2025年2月2日閲覧。

外部リンク

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.