Taiwan Bus API for Python
Project description
TaiwanBus
台灣公車,全台皆可使用
前置作業
從pip下載/更新
pip install TaiwanBus -U
從儲存庫安裝
# 複製儲存庫
git clone https://github.com/AvianJay/TaiwanBus
# 進入資料夾
cd TaiwanBus
# 安裝
pip install .
更新公車資料庫
taiwanbus updatedb
用法
終端機
usage: taiwanbus [-h] [-p PROVIDER]
{updatedb,showroute,searchroute,searchstop} ... TaiwanBus positional arguments:
{updatedb,showroute,searchroute,searchstop}
updatedb 更新公車資料庫
showroute 顯示公車路線狀態
searchroute 查詢路線
searchstop 查詢站點
options:
-h, --help show this help message and exit
-p PROVIDER, --provider PROVIDER
資料庫
Python
# 引入依賴庫
import taiwanbus
# 更新資料庫
taiwanbus.update_database()
# 切換地區資料庫
# 全台(無站點資料,無法查詢單一車站):twn
# 台中:tcc
# 台北:tpe
taiwanbus.update_provider("twn") # 替換 twn 成所需地區
# 取得路線
taiwanbus.get_complete_bus_info("304030") # 綠3
Termux/Discord
項目已移至AvianJay/TaiwanBus-Utils。
Credit
API by Yahoo!
(謝謝Yahoo 沒有你就不會有這個)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taiwanbus-0.0.8.tar.gz.
File metadata
- Download URL: taiwanbus-0.0.8.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6db6819a01dcaaf240e9286697add356e1d82974e559157c5cfaf918a5733d8f
|
|
| MD5 |
b81779f6e031cea4f2372a0425d36e1d
|
|
| BLAKE2b-256 |
03045df34a33c8e8d73c68bf9e11e71fbd531c2c1ebc35be5c8bdfd1b0467bc4
|
Provenance
The following attestation bundles were made for taiwanbus-0.0.8.tar.gz:
Publisher:
release.yml on AvianJay/TaiwanBus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taiwanbus-0.0.8.tar.gz -
Subject digest:
6db6819a01dcaaf240e9286697add356e1d82974e559157c5cfaf918a5733d8f - Sigstore transparency entry: 181027746
- Sigstore integration time:
-
Permalink:
AvianJay/TaiwanBus@3a294208f0f699396e454020b35c7de13daa756f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AvianJay
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a294208f0f699396e454020b35c7de13daa756f -
Trigger Event:
push
-
Statement type:
File details
Details for the file taiwanbus-0.0.8-py3-none-any.whl.
File metadata
- Download URL: taiwanbus-0.0.8-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ed34de1527d5ad24db83c846d53d3fc1b2d830c741aa38e73b4117bc3fd86c2
|
|
| MD5 |
ccbe8824e6942453290715f543f7c944
|
|
| BLAKE2b-256 |
240397915646939cec391d00c742f97e775052e6f593d590e66b1c17deeec6cc
|
Provenance
The following attestation bundles were made for taiwanbus-0.0.8-py3-none-any.whl:
Publisher:
release.yml on AvianJay/TaiwanBus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taiwanbus-0.0.8-py3-none-any.whl -
Subject digest:
7ed34de1527d5ad24db83c846d53d3fc1b2d830c741aa38e73b4117bc3fd86c2 - Sigstore transparency entry: 181027748
- Sigstore integration time:
-
Permalink:
AvianJay/TaiwanBus@3a294208f0f699396e454020b35c7de13daa756f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AvianJay
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a294208f0f699396e454020b35c7de13daa756f -
Trigger Event:
push
-
Statement type: