{"id":24780371,"url":"https://github.com/unyacat/westjr","last_synced_at":"2025-10-12T04:31:08.456Z","repository":{"id":37774618,"uuid":"352114074","full_name":"unyacat/westjr","owner":"unyacat","description":"JR西日本列車走行位置 非公式API Pythonライブラリ","archived":false,"fork":false,"pushed_at":"2025-09-22T17:34:45.000Z","size":309,"stargazers_count":30,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-09-22T19:30:40.023Z","etag":null,"topics":["python3","westjr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unyacat.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-27T15:57:06.000Z","updated_at":"2025-09-09T11:34:36.000Z","dependencies_parsed_at":"2023-02-16T10:55:15.565Z","dependency_job_id":"39e96183-2653-493c-900c-fb50fe42ca5f","html_url":"https://github.com/unyacat/westjr","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/unyacat/westjr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyacat%2Fwestjr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyacat%2Fwestjr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyacat%2Fwestjr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyacat%2Fwestjr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unyacat","download_url":"https://codeload.github.com/unyacat/westjr/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyacat%2Fwestjr/sbom","scorecard":{"id":397837,"data":{"date":"2025-08-11","repo":{"name":"github.com/unyacat/westjr","commit":"c4b027e826a27e0b4cba891e6723df0a154c2f02"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Code-Review","score":5,"reason":"Found 1/2 approved changesets -- score normalized to 5","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/unyacat/westjr/test.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/unyacat/westjr/test.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/unyacat/westjr/test.yml/develop?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"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":"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: The Unlicense: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T19:26:10.366Z","repository_id":37774618,"created_at":"2025-08-18T19:26:10.366Z","updated_at":"2025-08-18T19:26:10.366Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010259,"owners_count":26084719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["python3","westjr"],"created_at":"2025-01-29T10:22:03.916Z","updated_at":"2025-10-12T04:31:08.146Z","avatar_url":"https://github.com/unyacat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WestJR\n\n![Python Versions](https://img.shields.io/pypi/pyversions/WestJR.svg)\n![PyPI](https://badge.fury.io/py/WestJR.svg)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/unyacat/westjr/master.svg)](https://results.pre-commit.ci/latest/github/unyacat/westjr/master)\n![GitHubActions](https://github.com/unyacat/westjr/workflows/Test/badge.svg)\n\nJR西日本列車走行位置 非公式API Pythonライブラリ\n\n* 列車走行位置取得 (`/api/v3/{LINE}.json`)\n* メンテナンス予定取得 (`/api/v3/area_{AREA}_maintenance.json`)\n* 路線名取得 (`/api/v3/area_{AREA}_master.json`)\n* 駅一覧取得 (`/api/v3/{LINE}_st.json`)\n* 運行情報取得 (`/api/v3/area_{AREA}_trafficinfo.json`)\n* 列車環境取得 (`/api/v3/trainmonitorinfo.json`)\n* 列車走行位置駅名，列車停車種別の変換\n\n## Notice\n\n* 動作を完全には確認していません．\n\n## Installation\n\n```bash\npip install WestJR\n```\n\n## Usage\n\n[Wiki](https://github.com/unyacat/westjr/wiki) に情報があります．\n\n```python\nimport westjr\njr = westjr.WestJR()\n\n# あらかじめ area や line をセットする\njr = westjr.WestJR(line=\"kobesanyo\", area=\"kinki\")\n```\n\n### Example\n\n#### 列車走行位置取得\n\n```python\nprint(jr.get_trains())\n# TrainPos(update='2023-03-21T16:54:54.612Z', trains=[TrainsItem(no='502C', ...\n```\n\n#### メンテナンス予定取得\n\n```python\nprint(jr.get_maintenance())\n# 平常時:\n# AreaMaintenance(status=0, notification=Notification(groupId=0, text='', duration=''), ...\n# 異常時:\n# AreaMaintenance(status=1, notification=Notification(groupId=2023012802, text='1月24日から1月31日を, ...\n```\n\n#### 路線一覧取得\n\n```python\nprint(jr.get_lines())\n# AreaMaster(lines={'ako': Line(name='赤穂線', range='相生〜播州赤穂', relatelines=None, st='...\n```\n\n#### 駅一覧取得\n\n```python\nprint(jr.get_stations())\n# Stations(stations=[StationsItem(info=Info(name='新大阪', code='0415', stopTrains=[1, 2, 5], typeNotice=None, ...\n```\n\n#### 運行情報取得\n\n```Python\nprint(jr.get_traffic_info())\n# 平常時:\n# TrainInfo(lines={}, express={})\n# 異常時:\n# TrainInfo(lines={'bantan': Info_LineItem(...)}, express={'bantan': Info_ExpressItem(...)})\n```\n\n#### エリア名一覧表示\n\n```python\nprint(jr.areas)\n# ['hokuriku', 'kinki', 'okayama', 'hiroshima', 'sanin']\n```\n\n#### 路線名一覧表示\n\n```python\nprint(jr.lines)\n# ['hokuriku', 'kobesanyo', 'hokurikubiwako', 'kyoto', 'ako', 'kosei', 'kusatsu', 'nara', 'sagano', 'sanin1', 'sanin2', 'osakahigashi', 'takarazuka']\n```\n\n#### 列車環境取得\n\n```python\nprint(jr.get_train_monitor_info().trains[\"3489M\"][0].cars[0].congestion)\n# 26(%)\nprint(jr.get_train_monitor_info().trains[\"3489M\"][0].cars[0].temp)\n# 23(°C)\n```\n\n#### 駅に停車する種別を id から名称に変換する\n\n```python\nstation = jr.get_stations(line=\"kyoto\").stations[0]\n\nprint(station.info.name)\n# 山科\n\nprint(jr.convert_stopTrains(station.info.stopTrains))\n# ['新快速', '快速', '特急']\n```\n\n#### 列車走行位置の場所を前駅と次駅の名前に変換する\n\n```python\ntrain = jr.get_trains(line=\"kobesanyo\").trains\ntr = train[0]\nprev, next = jr.convert_pos(train=tr)\nprint(prev)\n# 塚本\n```\n\n## Contribution\n\n* develop ブランチにお願いします\n* インストールしていなければ [poetry](https://python-poetry.org/docs/master/) をインストールしてください\n* 初回は `poetry install \u0026\u0026 poetry run pre-commit install` を実行することで `poetry` と `pre-commit` のセットアップが行えます\n* `poetry shell` を実行すると仮想環境で開発することができます\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funyacat%2Fwestjr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funyacat%2Fwestjr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funyacat%2Fwestjr/lists"}