Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taiwanbus-0.0.9.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taiwanbus-0.0.9-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file taiwanbus-0.0.9.tar.gz.

File metadata

  • Download URL: taiwanbus-0.0.9.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for taiwanbus-0.0.9.tar.gz
Algorithm Hash digest
SHA256 8edb1fb2518ce6f575f8d693c4a92ea408c8fda0060d9a09e7c30c21b3863c6b
MD5 b7f563d5d45d734950fac79fc85be73a
BLAKE2b-256 af4aab08f4cf88411e263d78553e964c5ecc44c843d117cc15a491704b06d325

See more details on using hashes here.

Provenance

The following attestation bundles were made for taiwanbus-0.0.9.tar.gz:

Publisher: release.yml on AvianJay/TaiwanBus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taiwanbus-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: taiwanbus-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for taiwanbus-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7ca56039ca822f3c6af1d36557b13e314f787c27a34f6e29404f95dec7ae023d
MD5 8b0380b099101013a7fadfb47324d4df
BLAKE2b-256 388235511fd2ba6c2676fb3f9d0f8d08f7a20d56412d6b0a9cd56073cb789293

See more details on using hashes here.

Provenance

The following attestation bundles were made for taiwanbus-0.0.9-py3-none-any.whl:

Publisher: release.yml on AvianJay/TaiwanBus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page