planningalerts morph.io数据层python客户端包

morph_planningalerts的Python项目详细描述


https://img.shields.io/bitbucket/pipelines/otherchirps/morph_planningalerts.svg

旨在为PlanningAlerts记录提供一个简单、标准化的电阻层。

主要用于在morph.io上编写planningalerts scrapers时使用。变形python环境 安装了很好的库,比如scraperwiki,但是这些库没有强制数据requirements 计划警报需要。这个图书馆试图这样做。

安装

来源

python setup.py install

PIP

pip install morph_planningalerts

用法

frommorph_planningalertsimportDevelopmentApplication,MorphDatabase# Make sure the database file exists. If it does, this won't do anything.MorphDatabase.init()# Time passes... data is scraped...new_record=DevelopmentApplication.create(council_reference='M123/456',address='64 Zoo Lane',description='this is the least info needed to prevent explosions',info_url='http://detail_page_about_application',comment_url='http://some_feedback_url')# Or, if you only want to insert new records:record,was_created=DevelopmentApplication.create_or_get(council_reference=...)

有关更多示例,请查看querying with the Peewee ORM上的文档。

源代码

您可以在此处获取代码:

https://bitbucket.org/otherchirps/morph_planningalerts

测试

tox正用于在 Python2.7&3.x.

要启动测试环境,最简单的方法是 使用pip需求文件:

pip install -r requirements.txt

然后您只需运行:

tox

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

推荐PyPI第三方库


热门话题
当使用RequestDispatcher时,servlets Java最终没有被调用   java生成对具有可变参数数的方法的调用   java如何使用select子句中的参数化列映射iBATIS的查询?   java无法创建类型为org的插件。阿帕奇。登录中。log4j。果心阿佩德。元素RollingFile的RollingFileAppender   java当子实体和父实体之间存在OneTONE JPA关系时,是否可以将其与父实体一起持久化?   Android上的java Facebook集成fbconnect断开链接   获取方法调用方的java机制   从列表创建Oracle阵列时出现java问题   添加和检索元素的ArrayList的java ArrayList   在java中从字符串中删除无效的XML字符   java如何构建完整生成的maven模块   java如何准确地改变播放所有分辨率midi文件的速度?   shell javac:无效标志:/src/中位_度。ubuntu中的java   java使用从其他类的方法检索到的信息