Skip to content

saasus-platform/saasus-sdk-python

Repository files navigation

saasus-sdk-python

スキーマ

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

You can install directly from the GitHub repository:

# Install a specific version (recommended for production)
pip install git+https://github.com/saasus-platform/saasus-sdk-python.git@v1.0.0

# Or install the latest development version
pip install git+https://github.com/saasus-platform/saasus-sdk-python.git

For production use, we recommend installing a specific version tag. See releases for available versions.

(you may need to run pip with root permission)

Then import the package:

import saasus_sdk_python

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import saasus_sdk_python

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

from saasus_sdk_python.client.auth_client import SignedAuthApiClient
from saasus_sdk_python.src.auth.api.auth_info_api import AuthInfoApi
from saasus_sdk_python.src.auth.exceptions import ApiException
from pprint import pprint

# Set authentication information from environment variables
# Please set the following in .env file or environment variables:
# SAASUS_API_KEY=your_api_key
# SAASUS_SECRET_KEY=your_secret_key
# SAASUS_SAAS_ID=your_saas_id

# Create signed API client
api_client = SignedAuthApiClient()

# Create API instance
api_instance = AuthInfoApi(api_client)

try:
    # Get Authentication Info
    api_response = api_instance.get_auth_info()
    print("The response of AuthInfoApi->get_auth_info:\n")
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.saasus.io/v1/auth

Class Method HTTP request Description
AuthInfoApi get_auth_info GET /auth-info 認証情報を取得(Get Authentication Info)
AuthInfoApi get_identity_providers GET /identity-providers
AuthInfoApi get_sign_in_settings GET /sign-in-settings パスワード要件を取得(Get Password Requirements)
AuthInfoApi update_auth_info PUT /auth-info 認証情報を更新(Update Authentication Info)
AuthInfoApi update_identity_provider PUT /identity-providers
AuthInfoApi update_sign_in_settings PUT /sign-in-settings パスワード要件を更新(Update Password Requirements)
BasicInfoApi find_notification_messages GET /notification-messages 通知メールテンプレートを取得(Get Notification Email Templates)
BasicInfoApi get_basic_info GET /basic-info 基本設定情報の取得(Get Basic Configurations)
BasicInfoApi get_customize_page_settings GET /customize-page-settings 認証認可基本情報取得(Get Authentication Authorization Basic Information)
BasicInfoApi get_customize_pages GET /customize-pages 認証系画面設定情報取得(Get Authentication Page Setting)
BasicInfoApi update_basic_info PUT /basic-info 基本設定情報の更新(Update Basic Configurations)
BasicInfoApi update_customize_page_settings PATCH /customize-page-settings 認証認可基本情報更新(Update Authentication Authorization Basic Information)
BasicInfoApi update_customize_pages PATCH /customize-pages 認証系画面設定情報設定(Authentication Page Setting)
BasicInfoApi update_notification_messages PUT /notification-messages 通知メールテンプレートを更新(Update Notification Email Template)
CredentialApi create_auth_credentials POST /credentials 認証・認可情報の保存(Save Authentication/Authorization Information)
CredentialApi get_auth_credentials GET /credentials 認証・認可情報の取得(Get Authentication/Authorization Information)
EnvApi create_env POST /envs 環境情報を作成(Create Env Info)
EnvApi delete_env DELETE /envs/{env_id} 環境情報を削除(Delete Env Info)
EnvApi get_env GET /envs/{env_id} 環境情報を取得(Get Env Details)
EnvApi get_envs GET /envs 環境情報一覧を取得(Get Env Info)
EnvApi update_env PATCH /envs/{env_id} 環境情報を更新(Update Env Info)
ErrorApi return_internal_server_error GET /errors/internal-server-error ステータスコード500でサーバーエラーを返却(Return Internal Server Error)
RoleApi create_role POST /roles 役割(ロール)を作成(Create Role)
RoleApi delete_role DELETE /roles/{role_name} 役割(ロール)を削除(Delete Role)
RoleApi get_roles GET /roles 役割(ロール)一覧を取得(Get Roles)
SaasUserApi confirm_sign_up_with_aws_marketplace POST /aws-marketplace/sign-up-confirm AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace)
SaasUserApi create_saas_user POST /users SaaSにユーザーを作成(Create SaaS User)
SaasUserApi create_secret_code POST /users/{user_id}/mfa/software-token/secret-code 認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration)
SaasUserApi delete_saas_user DELETE /users/{user_id} ユーザー情報を削除(Delete User)
SaasUserApi get_saas_user GET /users/{user_id} ユーザー情報を取得(Get User)
SaasUserApi get_saas_users GET /users ユーザー一覧を取得(Get Users)
SaasUserApi get_user_mfa_preference GET /users/{user_id}/mfa/preference ユーザーのMFA設定を取得(Get User's MFA Settings)
SaasUserApi link_aws_marketplace PATCH /aws-marketplace/link AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace)
SaasUserApi resend_sign_up_confirmation_email POST /sign-up/resend 新規登録時の確認メール再送信(Resend Sign Up Confirmation Email)
SaasUserApi sign_up POST /sign-up 新規登録(Sign Up)
SaasUserApi sign_up_with_aws_marketplace POST /aws-marketplace/sign-up AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace)
SaasUserApi unlink_provider DELETE /users/{user_id}/providers/{provider_name} 外部IDプロバイダの連携解除(Unlink external identity providers)
SaasUserApi update_saas_user_email PATCH /users/{user_id}/email メールアドレスを変更(Change Email)
SaasUserApi update_saas_user_password PATCH /users/{user_id}/password パスワードを変更(Change Password)
SaasUserApi update_software_token PUT /users/{user_id}/mfa/software-token 認証アプリケーションを登録(Register Authentication Application)
SaasUserApi update_user_mfa_preference PATCH /users/{user_id}/mfa/preference ユーザーのMFA設定を更新(Update User's MFA Settings)
SaasusTenantApi create_api_key POST /apikeys APIキーを作成(Create API Key)
SaasusTenantApi delete_api_key DELETE /apikeys/{api_key} APIキーを削除(Delete API Key)
SaasusTenantApi get_api_keys GET /apikeys APIキー一覧を取得(Get API Keys)
SaasusTenantApi get_client_secret GET /client-secret クライアントシークレットを取得(Get Client Secret)
SaasusTenantApi get_saas_id GET /saasid SaasIDを取得(Get SaasID)
SaasusTenantApi update_client_secret PATCH /client-secret クライアントシークレットを更新(Update Client Secret)
SaasusTenantApi update_saas_id PATCH /saasid SaasIDを更新(Update SaasID)
TenantApi create_tenant POST /tenants テナントを作成(Create Tenant)
TenantApi create_tenant_and_pricing PATCH /stripe/init stripe初期設定(Stripe Initial Setting)
TenantApi delete_stripe_tenant_and_pricing DELETE /stripe stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe)
TenantApi delete_tenant DELETE /tenants/{tenant_id} テナント情報を削除(Delete Tenant)
TenantApi get_tenant GET /tenants/{tenant_id} テナント情報を取得(Get Tenant Details)
TenantApi get_tenants GET /tenants テナント一覧取得(Get Tenants)
TenantApi reset_plan PUT /plans/reset プランに関わる情報を全削除
TenantApi update_tenant PATCH /tenants/{tenant_id} テナント情報を更新(Update Tenant Details)
TenantApi update_tenant_billing_info PUT /tenants/{tenant_id}/billing-info テナントの請求先情報を更新(Update Tenant Billing Information)
TenantApi update_tenant_plan PUT /tenants/{tenant_id}/plans テナントのプラン情報を更新(Update Tenant Plan Information)
TenantAttributeApi create_tenant_attribute POST /tenant-attributes テナント属性の作成(Create Tenant Attribute)
TenantAttributeApi delete_tenant_attribute DELETE /tenant-attributes/{attribute_name} テナント属性の削除(Delete Tenant Attribute)
TenantAttributeApi get_tenant_attributes GET /tenant-attributes テナント属性の一覧を取得(Get Tenant Attributes)
TenantUserApi create_tenant_user POST /tenants/{tenant_id}/users テナントにユーザーを作成(Create Tenant User)
TenantUserApi create_tenant_user_roles POST /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role)
TenantUserApi delete_tenant_user DELETE /tenants/{tenant_id}/users/{user_id} テナントのユーザー情報を削除(Delete Tenant User)
TenantUserApi delete_tenant_user_role DELETE /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User)
TenantUserApi get_all_tenant_user GET /tenants/all/users/{user_id} ユーザー情報を取得(Get User Info)
TenantUserApi get_all_tenant_users GET /tenants/all/users ユーザー一覧を取得(Get Users)
TenantUserApi get_tenant_user GET /tenants/{tenant_id}/users/{user_id} テナントのユーザー情報を取得(Get Tenant User)
TenantUserApi get_tenant_users GET /tenants/{tenant_id}/users テナントのユーザー一覧を取得(Get Tenant Users)
TenantUserApi update_tenant_user PATCH /tenants/{tenant_id}/users/{user_id} テナントのユーザー属性情報を更新(Update Tenant User Attribute)
UserAttributeApi create_user_attribute POST /user-attributes ユーザー属性の作成(Create User Attributes)
UserAttributeApi delete_user_attribute DELETE /user-attributes/{attribute_name} ユーザー属性の削除(Delete User Attribute)
UserAttributeApi get_user_attributes GET /user-attributes ユーザー属性の一覧を取得(Get User Attributes)
UserInfoApi get_user_info GET /userinfo ユーザー情報取得(Get User Info)

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Bearer

  • Type: Bearer authentication

Author


新しいモジュールの追加方法

例えばhogeモジュールを追加したい時

  1. モジュールのymlファイルをsaasus_sdk_python直下に配置する
  2. generate.shのMODULESにモジュール名を追加する
MODULES=("auth" "pricing" "billing" "hoge")
  1. hoge_client.pysaasus_sdk_python/client配下に作成する
    1. auth_client.pyはconfiguration.default_headersがなかったりして少し特殊なためpricing_client.pyをコピーして作成するのが望ましい
    2. 適宜Client名を変更する
    3. hoge_client.pyを一部修正する
   # このhost名を修正
    self.configuration.host = f"{self.base_url}/hoge"
  1. 必要に応じてSDK呼び出し側のサンプル(main.py)も変更する

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages