Weblate の Python API¶
インストール¶
Python API は標準では入っていません。使用するには Weblate クライアント (wlc)をインストールしてください。
pip install wlc
wlc
¶
WeblateException
¶
- exception wlc.WeblateException¶
すべての例外の基底クラス。
Weblate
¶
- class wlc.Weblate(key='', url=None, config=None)¶
- パラメータ:
key (str) -- ユーザー key
url (str) -- API server URL, if not specified default is used.
config (wlc.config.WeblateConfig) -- 設定オブジェクト、他のパラメータを上書きする。
API へのアクセス クラスに、API キーと必要なら API URL を設定します。
- get(path)¶
- パラメータ:
path (str) -- リクエストのパス
- 戻り値の型:
object
単体の API GET 呼び出しを実行します。
- post(path, **kwargs)¶
- パラメータ:
path (str) -- リクエストのパス
- 戻り値の型:
object
単体の API GET 呼び出しを実行します。
wlc.config
¶
WeblateConfig
¶
wlc.main
¶
- wlc.main.main(settings=None, stdout=None, args=None)¶
- パラメータ:
settings (list) -- タプルのリストとして上書きする設定
stdout (object) -- 出力表示用の stdout ファイル オブジェクト。デフォルトで
sys.stdout
を使用するargs (list) -- 処理用のコマンドライン引数。デフォルトで
sys.args
を使用する
コマンドライン インターフェイスのメイン エントリ ポイント。
Command
¶
- class wlc.main.Command(args, config, stdout=None)¶
コマンドを呼び出すためのメイン クラス。