用于与LTA DataMall上的API交互的Python包

landtransportsg的Python项目详细描述


Python 3PyPiPyPi statusGNU General Public License v3.0Documentation Status

这是一个非官方的Python包,用于与api交互 LTA DataMall。在

安装程序包

使用pip安装包:

pip install landtransportsg

使用软件包

先决条件:

主要步骤是:

  1. 导入一个类。在
  2. 从类实例化一个对象。在
  3. 调用该对象上的函数。在

有关详细信息,refer to the documentation。在

使用概述

LTA DataMall的API的交互是通过三个客户端之一完成的, 其中每个客户端对应一组端点。在

这四个客户机是:ActiveMobilityGeospatialPublicTransportTraffic。在

每个客户端包含多个公共函数,每个端点一个函数。A 函数的名称与其相应端点的结束路径相同。在

有些函数接受命名参数,其中参数与 终结点接受的参数。在

Why have separate clients instead of one single client?

Without knowing how LTA DataMall’s API will evolve, and noticing that the endpoints were themselves already partitioned into sets, it seemed like a good idea to keep each set of endpoints in its own contextual client. This allows for each set of endpoints to be customised on their own, e.g. the ^{tt4}$ passenger volume-related endpoints allow for a string to be returned, whereas the other endpoints return a list.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何通过编程将图像插入Word文档?   java Maven在Quickstart原型中更改jUnit版本   OS X上的eclipse java版本和路径   java在hibernate中将具有依赖对象的类映射到单独的表   JavaJSF2如何在复合组件子组件完成操作后执行操作?   java无法从列表<节点>强制转换为列表<元素>   java如何将数组链接到方法   检查数组中是否存在一个范围内的所有值的最佳方法是什么?(爪哇)   redis Java:我们应该尽快退出trywithresource块来释放资源吗?   对象不会出现在java swing中的按键上   SQLServerJava。sql。SQLException:客户端尝试签出连接已超时   java如何使用JPA以线程安全的方式保存或更新对象?   java如何在不显示滚动条的情况下消除SWT ScrolledComposite中浪费的空间   如何在Eclipse中从Java编辑器显示scala文档?