bushk


Namebushk JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/max-github110331/bushk
Summary取得香港巴士的數據!
upload_time2023-12-10 05:33:40
maintainer
docs_urlNone
authorMaxPython110331
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Quickstart

> What does `bushk` do?
> - [Get data of the bus stop in Hong Kong](#get-data-of-the-bus-stop)
> - [Get data of route in Hong Kong](#get-data-of-the-route)
> - [Get ETA of bus in Hong Kong](#check-eta-of-bus)

**Install `bushk`**
```shell
pip install bushk
```

## Get data of the bus stop

> How can I get data of the bus stop?
> 1. [Copy or reference code](#example-code)
> 2. [Run your Python file](#get-data-of-the-bus-stop)

### Example Code
```py
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](#example-code-1)
> 2. [Run your Python file](#get-stop-of-bus)

### Example Code
```py
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](#example-code-2)
> 2. [Run your Python file](#check-eta-of-bus)

### Example Code
```py
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})")
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/max-github110331/bushk",
    "name": "bushk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "MaxPython110331",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/34/62/228b4e07c23354e783d2701227247bca01d611b20e7601846e0846711627/bushk-0.0.2.tar.gz",
    "platform": null,
    "description": "# Quickstart\r\n\r\n> What does `bushk` do?\r\n> - [Get data of the bus stop in Hong Kong](#get-data-of-the-bus-stop)\r\n> - [Get data of route in Hong Kong](#get-data-of-the-route)\r\n> - [Get ETA of bus in Hong Kong](#check-eta-of-bus)\r\n\r\n**Install `bushk`**\r\n```shell\r\npip install bushk\r\n```\r\n\r\n## Get data of the bus stop\r\n\r\n> How can I get data of the bus stop?\r\n> 1. [Copy or reference code](#example-code)\r\n> 2. [Run your Python file](#get-data-of-the-bus-stop)\r\n\r\n### Example Code\r\n```py\r\nimport bushk\r\n\r\n\r\n@bushk.runner\r\nasync def _stop():\r\n\tstop=await bushk.Stops.get(\"ID OF STOP\")\r\n\tprint(f\"{stop.id}: {stop.name['en']}\")\r\n```\r\n\r\n## Get data of the route\r\n\r\n> How can I get data of the bus stop?\r\n> 1. [Copy or reference code](#example-code-1)\r\n> 2. [Run your Python file](#get-stop-of-bus)\r\n\r\n### Example Code\r\n```py\r\nimport bushk\r\n\r\n\r\n@bushk.runner\r\nasync def _route():\r\n\troute=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)\")\r\n\tprint(f\"Route: {route.route}\\nNormal: {route.normal}\\nBound: {route.bound}\")\r\n```\r\n\r\n## Check ETA of Bus\r\n\r\n> How can I get ETA of bus?\r\n> 1. [Copy or reference code](#example-code-2)\r\n> 2. [Run your Python file](#check-eta-of-bus)\r\n\r\n### Example Code\r\n```py\r\nimport bushk\r\n\r\n\r\n@bushk.runner\r\nasync def _eta():\r\n\troute=await bushk.Routes.get(\"NUMBER OF ROUTE WHICH YOU WANT TO CHECK THE ETA OF THE BUS\")\r\n\tfor eta in await bushk.ETA.get_route(route):\r\n\t\tprint(f\"{bushk.Stops.get(route.stops_id[eta.seq]).name['en']}: {eta.arrive_at}({eta.rmk})\")\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\u53d6\u5f97\u9999\u6e2f\u5df4\u58eb\u7684\u6578\u64da!",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/max-github110331/bushk"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ab47cba3bc53d5b215404d312635d05def9ce7ad26504f1b7ecefa0a2631087",
                "md5": "a1a92cd67b0df88b616613d301fffe4f",
                "sha256": "421c60bb24df8422ff4c5e1ab3f6a03ab582ec459face4da84c9d2d01d7b90d2"
            },
            "downloads": -1,
            "filename": "bushk-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a1a92cd67b0df88b616613d301fffe4f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5222,
            "upload_time": "2023-12-10T05:33:39",
            "upload_time_iso_8601": "2023-12-10T05:33:39.290821Z",
            "url": "https://files.pythonhosted.org/packages/0a/b4/7cba3bc53d5b215404d312635d05def9ce7ad26504f1b7ecefa0a2631087/bushk-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3462228b4e07c23354e783d2701227247bca01d611b20e7601846e0846711627",
                "md5": "c0489e1475db66a335acf647e6bd3333",
                "sha256": "fe40728b05f995639f668003ae72b6e4f9f06463e975b6c32b342739797353b5"
            },
            "downloads": -1,
            "filename": "bushk-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c0489e1475db66a335acf647e6bd3333",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3938,
            "upload_time": "2023-12-10T05:33:40",
            "upload_time_iso_8601": "2023-12-10T05:33:40.542551Z",
            "url": "https://files.pythonhosted.org/packages/34/62/228b4e07c23354e783d2701227247bca01d611b20e7601846e0846711627/bushk-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-10 05:33:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "max-github110331",
    "github_project": "bushk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bushk"
}
        
Elapsed time: 0.16497s