一个简单的python包,用于处理python中的邮政编码。

zipcodeignoresamethread的Python项目详细描述


用python处理邮政编码的简单包。这是一把叉子 创建要忽略的包zipcode(https://github.com/buckmaxwell/zipcode) 检查所创建的SQL对象是否与当前对象在同一线程中。

完整的文档位于https://pythonhosted.org/zipcode

>>> import zipcode
>>>
>>> myzip = zipcode.isequal('44102')
>>> myzip.state     #=> 'OH'
>>> myzip.city      #=> 'Cleveland'
>>>
>>> myzip.to_dict() #=>  {'zip_type': u'STANDARD', 'city': u'CLEVELAND', 'population': u'27699', 'zip': u'44102', 'yaxis': u'-0.74',     'location_text': u'Cleveland, OH', 'country': u'NA', 'notes': u'', 'lon': -81.67, 'tax_returns_filed': u'17409', 'state': u'OH', 'z    axis': u'0.66', 'location': u'NA-US-OH-CLEVELAND', 'xaxis': u'0.1', 'lat': 41.47, 'wages': u'408225500', 'decommisioned': u'FALSE',     '_LOCATION_TYPE': u'PRIMARY', 'world_region': u'NA'}
>>>
>>> #all keys in the dictionary can be fetched with dot notation.
>>>
>>> zipcode.islike('00') #=> list of Zip objects that begin with given prefix.
>>>
>>> cbus = (39.98, -82.98)
>>> zipcode.isinradius(cbus, 20) #=> list of all zip code objects within 20 miles of 'cbus'

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

推荐PyPI第三方库


热门话题
在扩展类中将Java重写为抽象的非抽象方法   java可滚动视图   java Android:隐藏操作栏,保持标签   java如何在Hibernate中使用@Qualifier   java如何在spring MVC中进行Http会话管理以获取数据库中的数据   java如何为TictaToe游戏创建HashMap   java在消息资源文件中查找未使用的值   从源代码构建Kafka时发生java错误   c中的java调用optaplanner DLL#   无法通过Java API访问orientdb函数   任务的java执行失败“:app:ProcessDebuggGoogleService”   java在整个模拟过程中保持代理之间的距离不变   如何在Java中使用BouncyCastle PGP实用程序实现增量加密?   java在安卓中计算画布点的距离   Java回文修订   java在Firebase数据库中存储变量的必要性   java如何使用gquery手势插件在页面上启用文本突出显示?   java如何在Apache camel中使用POST调用REST?