Skip to main content

取得香港巴士的數據!

Project description

Quickstart

What does bushk do?

Install bushk

pip install bushk

Get data of the bus stop

How can I get data of the bus stop?

  1. Copy or reference code
  2. Run your Python file

Example Code

import bushk


@bushk.runner
async def _stop():
	stop=await bushk.Stops.get("ID OF STOP")
	print(f"{stop.id}: {stop.name['en']}")

Get data of the route

How can I get data of the bus stop?

  1. Copy or reference code
  2. Run your Python file

Example Code

import bushk


@bushk.runner
async def _route():
	route=await bushk.Routes.get("NUMBER OF THE ROUTE", "direction OF THE ROUTE(O, I, OUTBOUND, INBOUND, OB OR IB)(OPTIONAL)", "SERVICE TYPE OF THE ROUTE(1 OR 2)(OPTIONAL)")
	print(f"Route: {route.route}\nNormal: {route.normal}\nBound: {route.bound}")

Check ETA of Bus

How can I get ETA of bus?

  1. Copy or reference code
  2. Run your Python file

Example Code

import bushk


@bushk.runner
async def _eta():
	route=await bushk.Routes.get("NUMBER OF ROUTE WHICH YOU WANT TO CHECK THE ETA OF THE BUS")
	for eta in await bushk.ETA.get_route(route):
		print(f"{bushk.Stops.get(route.stops_id[eta.seq]).name['en']}: {eta.arrive_at}({eta.rmk})")

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

bushk-0.0.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

bushk-0.0.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file bushk-0.0.2.tar.gz.

File metadata

  • Download URL: bushk-0.0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for bushk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fe40728b05f995639f668003ae72b6e4f9f06463e975b6c32b342739797353b5
MD5 c0489e1475db66a335acf647e6bd3333
BLAKE2b-256 3462228b4e07c23354e783d2701227247bca01d611b20e7601846e0846711627

See more details on using hashes here.

File details

Details for the file bushk-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: bushk-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for bushk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 421c60bb24df8422ff4c5e1ab3f6a03ab582ec459face4da84c9d2d01d7b90d2
MD5 a1a92cd67b0df88b616613d301fffe4f
BLAKE2b-256 0ab47cba3bc53d5b215404d312635d05def9ce7ad26504f1b7ecefa0a2631087

See more details on using hashes here.

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