PostNL位置SOAP API的Python封装器
项目描述
PostNL位置SOAP API的Python封装器。您可以在以下位置找到源代码:python-postnl-locations。
兼容性
此包依赖于suds-jurko,它是原始包的完全兼容版本,包含一些错误修复和速度提升,同时也支持Python 3。因此,此包依赖于它(suds-py3仍然存在一些兼容性问题)。
使用方法
要使用此包,请按照以下步骤操作
以某种方式安装此Python包。(pip install postnl-locations)
在您的项目中,创建一个至少包含以下参数的设置字典
MY_SETTINGS = {
# this is the testservice wsdl, see the PostNL documentation for the production settings
'wsdl': "https://testservice.postnl.com/CIF_SB/LocationWebService/2_0/?wsdl",
'countrycode': 'NL',
'username': "my-username",
# the password is SHA1 hashed
'password': "my-sha1-hashed-password",
}
按照以下方式使用客户端
from postnl.locations.client import Locations
locations = Locations(settings=MY_SETTINGS)
my_locations = locations.nearest_locations(postalcode="6821AD")
查看settings.py以获取更多选项(例如,您可以通过自定义resultstransform类来调整结果)。
项目详情
关闭
postnl-locations-0.2.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 58d37bb23bda74a8f8bf5cc894a1987d2bd2272c6ac2a3d8f71af83f7d795c4f |
|
MD5 | 5a0a0616f66b8c1350265ced9364b9f8 |
|
BLAKE2b-256 | 9ab3c8fcd81e0955cba4b11304f78376c96f626e9b5d2defb1f73c6c5f18c909 |