取得香港巴士的數據!
Reason this release was yanked:
There are some bugs in this version.
Project description
Quickstart
What does
bushkdo?
Install bushk
pip install bushk
Get data of the bus stop
How can I get data of the bus stop?
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?
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?
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
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
bushk-0.0.1.tar.gz
(4.0 kB
view details)
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
bushk-0.0.1-py3-none-any.whl
(5.2 kB
view details)
File details
Details for the file bushk-0.0.1.tar.gz.
File metadata
- Download URL: bushk-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f93269f69747517fc5c36a5e250c793f4b5d20274a614715651bf2832338fb
|
|
| MD5 |
0e369261c66a1dffc29db4d05c99b6fb
|
|
| BLAKE2b-256 |
127225bf5307c583af1d309605ce4b47bc3d1796875249c4ab89b5714a024ea4
|
File details
Details for the file bushk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: bushk-0.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4f428e70552973588cfcdf976ca8f837e5fa594c8a4a6772a5647338b9c0195
|
|
| MD5 |
25aab5d4fdd9c8daf99693b9a3f624b7
|
|
| BLAKE2b-256 |
20e0193ead04e056c88a95fef23c41b3932d0e73f4fd587aaa59bc8e2dea29ba
|