{"id":43218324,"url":"https://github.com/nttcom/apigw-python-sdk","last_synced_at":"2026-02-01T08:30:43.527Z","repository":{"id":57410869,"uuid":"45526165","full_name":"nttcom/apigw-python-sdk","owner":"nttcom","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-23T07:18:57.000Z","size":15,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-31T10:33:59.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nttcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-04T08:45:06.000Z","updated_at":"2015-11-04T08:45:43.000Z","dependencies_parsed_at":"2022-09-05T14:32:17.944Z","dependency_job_id":null,"html_url":"https://github.com/nttcom/apigw-python-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nttcom/apigw-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nttcom%2Fapigw-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nttcom%2Fapigw-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nttcom%2Fapigw-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nttcom%2Fapigw-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nttcom","download_url":"https://codeload.github.com/nttcom/apigw-python-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nttcom%2Fapigw-python-sdk/sbom","scorecard":{"id":697850,"data":{"date":"2025-08-11","repo":{"name":"github.com/nttcom/apigw-python-sdk","commit":"8050939f5c854a9595671d17bc0a04db96f8eb88"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T04:14:26.257Z","repository_id":57410869,"created_at":"2025-08-22T04:14:26.257Z","updated_at":"2025-08-22T04:14:26.257Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-01T08:30:43.457Z","updated_at":"2026-02-01T08:30:43.520Z","avatar_url":"https://github.com/nttcom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"NTT Communications API SDK(python)\n===\n\nこのライブラリは、NTT Communications APIsと対話的にアクセスするための簡易的なラッパーを提供します。\n各APIの仕様については、[デベロッパーポータル](https://developer.ntt.com/ja)のドキュメントを参照ください。\n\nセットアップ\n---\n\n### pip での使用\n\n```\n$ pip install apigw\n```\n\nシステム要件\n---\n\n* Python 2.7.x\n* Python 3.4.x\n※Python 2.7.9 および 3.4.3 で動作検証済\n\n使い方\n---\n\n現在、クライアントは\n\n* OAuth API\n* Business Process API\n* APILog API\n* IAM API\n\nの3つのAPIへのアクセスを提供します。\n\n### クライアントの生成\n\nクライアントの生成時には、エンドポイントの情報を記載したJSON形式の設定ファイルへのパスを指定します。\n\n```python\nfrom apigw.client import ApiGWClient\n\nclient = ApiGWClient(config_path = '/path/to/config.json', environment = 'development')\n```\n\n設定ファイル例:\n\n```json\n{\n  \"development\": {\n    \"host\": \"ホスト名\"(e.g. 'https://api.ntt.com/'),\n    \"api_version\": \"APIバージョン\"(e.g. 'v1'),\n    \"timeout\": タイムアウト(ms),\n    \"verify_ssl\": SSL証明書の検証を行うか(true / false),\n    \"debuggable\": デバッグ情報を表示するか(true / false)\n  }\n}\n```\n\n※ host と api_version は必須となります。\n\n### アクセストークンの取得\n\n[デベロッパーポータル](https://developer.ntt.com/ja) にて払い出されたコンシューマーキーとシークレットキーを指定します。\n\n```python\nresponse = client.oauth('コンシューマーキー', 'シークレットキー').request_access_token()\naccess_token = response.json().get('accessToken')\n```\n\n全てのAPIのレスポンスは [requests.Response](http://docs.python-requests.org/en/latest/api/#requests.Response) オブジェクトで返却されます。\nレスポンスのJSONは `Response#json()` メソッドよりdict形式にパースされたものが取得できます。\n各APIのレスポンス仕様については、[デベロッパーポータル](https://developer.ntt.com/ja)のドキュメントを参照ください。\n\n### Business Process API\n\nOAuth API にて取得したアクセストークンとAPIパス、サービス名称を指定します。\n\n```python\nresponse = client.business_process('アクセストークン').get('contracts', 'サービス名称')\nitems = response.json().get('items')\n```\n\n情報の参照には `apigw.business_process.BusinessProcess#get(...)` を、各種オーダには `apigw.business_process.BusinessProcess#post(...)` を利用します。\n\n### APILog API\n\nOAuth API にて取得したアクセストークンと利用履歴の対象日を指定します。\n\n```python\nresponse = client.api_log('アクセストークン').get('日付(YYYYMMDD)')\nrecords = response.json().get('Records')\n```\n\n### その他API\n\nexampleファイルを参考にしてください。\n\nApiBase の継承について\n---\n\n新しいAPIに対応したクラスを作成する場合は、`apigw.api_base.ApiBase`のサブクラスを実装します。\n以下のドキュメント及び `apigw.business_process.BusinessProcess` や `apigw.api_log.ApiLog` を参考に実装してください。\n\n### 実装が必要なクラスメソッド\n\n#### `api_name()`\n\nAPIの名称を返すメソッドです。\n\n`https://api.ntt.com/v1/xxxxxx/yyyyyy` の `xxxxxx` の部分を返します。\n例えば `BusinessProcess` では `business-process` 、 `ApiLog` では `apilog` を返すよう実装されています。\n\napi_name をオーバーライドしないと NotImplementedError が発生します。\n\n#### `require_authorization()`\n\nこのAPIに認証(アクセストークン)が必要かを返します。デフォルトでは False です。\n\nTrueを返すようにすると、リクエストヘッダーに `Authorization` を自動で付加するようになります。\n\n### リクエスト時に使用するインスタンスメソッド\n\n#### `XXX_request(path, **kwargs)`\n\n`get_request`, `post_request`, `put_request`, `delete_request`, `options_request` の5つが定義されています。\nそれぞれ GET, POST, PUT, DELETE, OPTIONS のリクエストを実行し、結果を返します。\n\n`path` は `https://api.ntt.com/v1/xxxxxx/yyyyyy` の `yyyyyy` の部分を渡します。\n`yyyyyy` に相当するパスがないAPIの場合、 `None` を指定します。\n\nライセンス\n---\nCopyright © 2015 NTT Communications  \n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnttcom%2Fapigw-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnttcom%2Fapigw-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnttcom%2Fapigw-python-sdk/lists"}