到http://geocod.io的简单twisted接口
txgeocodio的Python项目详细描述
为http://geocod.io提供极其平淡的扭曲客户端。这真的很乏味,因为他们的api很容易使用。
用法
这里没什么特别的:
import txgeocodio txgecodio.configure('YOURAPIKEYHERE') # Geocode some address and get a list of results d = txgecodio.geocode('123 Main ST, 91702') # d is a deferred with a list of results # Parse an address into parts (no geo lookup is made) d = txgecodio.parse('42370 Bob Hope Dr, Rancho Mirage, CA') # d is a deferred with the results in a dict that look something like: { "address_components": {"number": "42370", "street": "Bob Hope", "suffix": "Dr", "city": "Rancho Mirage", "state": "CA" }, "formatted_address": "42370 Bob Hope Dr, Rancho Mirage, CA" }
历史记录
0.1.3()
- 批处理模式中的地理编码错误现在返回该查询的空列表
- ^^^这在未来肯定会改变。
0.1.2()
- 修复了init.py中缺少的批处理方法
0.1.1()
- 添加了批处理模式
0.1.0()
- pypi上的第一个版本。