nycu-tdx-py


Namenycu-tdx-py JSON
Version 0.1.52 PyPI version JSON
download
home_pagehttps://github.com/ChiaJung-Yeh/nycu_tdx_py
SummaryPython library for connecting to TDX
upload_time2023-10-16 22:55:42
maintainer
docs_urlNone
authorChia-Jung (Robert) Yeh
requires_python
licenseMIT
keywords tdx transport
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Overview

<img src="./figure/TDX_icon.png" width="30%" style="display: block; margin: auto;" />

This package can be used to connect transportation data from TDX
(Transport Data eXchange) in a neat and efficient way in Python. TDX platform is
supported by Ministry of Transportation and Communications (MOTC) in
Taiwan, which provides lots of API for the members download the
transportation data. Before using the function provided in this package,
the authentication key is a must, which can be applied from [TDX
platform](https://tdx.transportdata.tw/register). After being a member
of TDX, you will soon get the Client Id and Client Secret, please check
out in the [API key
Dashboard](https://tdx.transportdata.tw/user/dataservice/key).

If you are R user, please install the packages on Github via `devtools::install_github("ChiaJung-Yeh/NYCU_TDX")`,
and all of the functions can be found in  **[TDX
Guide](https://chiajung-yeh.github.io/TDX_Guide/)** website.

## Installation

Please install the package via following pip code.

    pip install nycu-tdx-py

## Usage

Data retrieving process requires an access token to obtain the data from
TDX platform. Every function in this package should use function
`get_token()` to obtain the token by entering your Client ID and Client
Secret first. Note that the access token will expire in 1 day.

Take retrieving bus stops of Taipei City for example. The
code is shown below. Here the argument `client_id` and `client_secret`
is the authentication key applied from TDX.

    from nycu_tdx_py import tdx
    
    # get the access token first
    access_token=tdx.get_token("CLIENT_ID", "CLIEN_SECRET")

    # retrieve Taipei bus stops
    taipei_bus=tdx.Bus_StopOfRoute(access_token, "Taipei")


## Support

This package takes advantage of API service provided by TDX, MOTC.

<img src="./figure/TDX.png" width="60%" style="display: block; margin: auto;" />

## Contact

For questions, bugs, and other discussion, please feel free to contact
the package maintainer, Chia-Jung (Robert), Yeh.  
Email:
<a href="mailto:chia-jung.yeh@sydney.edu.au"><u><chia-jung.yeh@sydney.edu.au></u></a>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ChiaJung-Yeh/nycu_tdx_py",
    "name": "nycu-tdx-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tdx transport",
    "author": "Chia-Jung (Robert) Yeh",
    "author_email": "chia-jung.yeh@sydney.edu.au",
    "download_url": "https://files.pythonhosted.org/packages/a3/87/2a9592778c4b99068fba5477a6dc5cff9a2a92253a30f56d359e43d36046/nycu_tdx_py-0.1.52.tar.gz",
    "platform": null,
    "description": "## Overview\r\n\r\n<img src=\"./figure/TDX_icon.png\" width=\"30%\" style=\"display: block; margin: auto;\" />\r\n\r\nThis package can be used to connect transportation data from TDX\r\n(Transport Data eXchange) in a neat and efficient way in Python. TDX platform is\r\nsupported by Ministry of Transportation and Communications (MOTC) in\r\nTaiwan, which provides lots of API for the members download the\r\ntransportation data. Before using the function provided in this package,\r\nthe authentication key is a must, which can be applied from [TDX\r\nplatform](https://tdx.transportdata.tw/register). After being a member\r\nof TDX, you will soon get the Client Id and Client Secret, please check\r\nout in the [API key\r\nDashboard](https://tdx.transportdata.tw/user/dataservice/key).\r\n\r\nIf you are R user, please install the packages on Github via `devtools::install_github(\"ChiaJung-Yeh/NYCU_TDX\")`,\r\nand all of the functions can be found in  **[TDX\r\nGuide](https://chiajung-yeh.github.io/TDX_Guide/)** website.\r\n\r\n## Installation\r\n\r\nPlease install the package via following pip code.\r\n\r\n    pip install nycu-tdx-py\r\n\r\n## Usage\r\n\r\nData retrieving process requires an access token to obtain the data from\r\nTDX platform. Every function in this package should use function\r\n`get_token()` to obtain the token by entering your Client ID and Client\r\nSecret first. Note that the access token will expire in 1 day.\r\n\r\nTake retrieving bus stops of Taipei City for example. The\r\ncode is shown below. Here the argument `client_id` and `client_secret`\r\nis the authentication key applied from TDX.\r\n\r\n    from nycu_tdx_py import tdx\r\n    \r\n    # get the access token first\r\n    access_token=tdx.get_token(\"CLIENT_ID\", \"CLIEN_SECRET\")\r\n\r\n    # retrieve Taipei bus stops\r\n    taipei_bus=tdx.Bus_StopOfRoute(access_token, \"Taipei\")\r\n\r\n\r\n## Support\r\n\r\nThis package takes advantage of API service provided by TDX, MOTC.\r\n\r\n<img src=\"./figure/TDX.png\" width=\"60%\" style=\"display: block; margin: auto;\" />\r\n\r\n## Contact\r\n\r\nFor questions, bugs, and other discussion, please feel free to contact\r\nthe package maintainer, Chia-Jung (Robert), Yeh.  \r\nEmail:\r\n<a href=\"mailto:chia-jung.yeh@sydney.edu.au\"><u><chia-jung.yeh@sydney.edu.au></u></a>\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library for connecting to TDX",
    "version": "0.1.52",
    "project_urls": {
        "Homepage": "https://github.com/ChiaJung-Yeh/nycu_tdx_py"
    },
    "split_keywords": [
        "tdx",
        "transport"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3872a9592778c4b99068fba5477a6dc5cff9a2a92253a30f56d359e43d36046",
                "md5": "13deaecfc1292586c9404194af9838e4",
                "sha256": "6c4aee1d30061b412bede3e54a6c8745887068bfadefde6e78bafeabd871e586"
            },
            "downloads": -1,
            "filename": "nycu_tdx_py-0.1.52.tar.gz",
            "has_sig": false,
            "md5_digest": "13deaecfc1292586c9404194af9838e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10712,
            "upload_time": "2023-10-16T22:55:42",
            "upload_time_iso_8601": "2023-10-16T22:55:42.666531Z",
            "url": "https://files.pythonhosted.org/packages/a3/87/2a9592778c4b99068fba5477a6dc5cff9a2a92253a30f56d359e43d36046/nycu_tdx_py-0.1.52.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 22:55:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ChiaJung-Yeh",
    "github_project": "nycu_tdx_py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nycu-tdx-py"
}
        
Elapsed time: 0.13241s