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.8.tar.gz (15.2 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.8-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

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

Hashes for taiwanbus-0.0.8.tar.gz
Algorithm Hash digest
SHA256 6db6819a01dcaaf240e9286697add356e1d82974e559157c5cfaf918a5733d8f
MD5 b81779f6e031cea4f2372a0425d36e1d
BLAKE2b-256 03045df34a33c8e8d73c68bf9e11e71fbd531c2c1ebc35be5c8bdfd1b0467bc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for taiwanbus-0.0.8.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.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

Hashes for taiwanbus-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed34de1527d5ad24db83c846d53d3fc1b2d830c741aa38e73b4117bc3fd86c2
MD5 ccbe8824e6942453290715f543f7c944
BLAKE2b-256 240397915646939cec391d00c742f97e775052e6f593d590e66b1c17deeec6cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for taiwanbus-0.0.8-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