巴西Correios API和服务的客户端库
correios的Python项目详细描述
巴西Correios API(SIGEP和SRO)和服务的客户端库。
安装
$ pip install correios # basic model support $ pip install correios[pdf] # label and posting list pdf generation support $ pip install correios[api] # support for SIGEP/SRO API client $ pip install correios[pdf,api] # full installation
更新本地wsdl文件
本地wsdl文件用于提高soap请求的性能。环境的 您需要更新它们,而不必更新这个库。
如果要在自定义路径上维护此文件,可以传递“路径” 具有自定义路径的选项。不要使用相对路径。
只需在shell上运行
$ update-correios-wsdl -p /path/to/your/custom/wsdl/folder
参数: -p,–path:保存wsdl文件的自定义路径,注意这个选项 将具有比envvar“correios\u wsdl\u path”的值更高的优先级
或者您可以使用update_wsdl方法来执行此操作。
from correios.update_wsdl import update_wsdl update_wsdl(path='/path/to/your/custom/wsdl/folder')
就这样!