更具活力,人性化的玩法
graphic的Python项目详细描述
本项目的目标是: more pythonic,humanize way to play with graph model
安装
pip install graphic
基本示例
>>>fromgraphicimportuse_neo4j>>>neo4j=use_neo4j()>>>boss=graphic.node('Boss',uid=1234)._as('b')>>>geek=graphic.node('Geek',uid=2345)._as('g')>>>neo4j.push(graphic.relationship(boss,geek,'WORKTAT',startat=3432432)>>>q=graphic.node().filter(id__gt=123).select('id')>>>graph=neo4j.fetch(q)>>>fromgraphic.query.funcimportavg>>>q=graphic.node().select(avg('uid')).order_by('-id').limit(10)