メインコンテンツへスキップ
import squarecloud as square

client = square.Client(api_key='API_KEY')

async def example():
    app_status = await client.app_status('application_id')
    print(app_status)

パラメータ:

  • api_key
api_key: str: Client オブジェクトをインスタンス化する際に必須のパラメータです。 認証を正しく行うために、有効な API キーを文字列として指定する必要があります。
  • debug
debug: bool = True: Client オブジェクトのデバッグモードを制御する オプションのパラメータです。True に設定すると、リクエストが行われるたびに Client オブジェクトが デバッグ情報を出力し、問題の検出と解決を容易にします。 ただし本番環境では、不要な情報の表示を避けるために、このパラメータを False に設定するのが一般的です。 この値はデフォルトで True です。

Application

[Client] を使うと、アプリケーションを表すオブジェクト(またはオブジェクトの リスト)を取得できます。このオブジェクトは Application クラスの インスタンスで、アプリケーションの id を常に渡す必要なく、 アプリケーションをより便利に管理するために使えます。
import squarecloud as square

client = square.Client(api_key='API KEY')

async def example():
    app = await client.app('application id')
    print(app)  # <Application tag='example' id='application_id'>