All Projects → emehrkay → gizmo

emehrkay / gizmo

Licence: MIT license
OGM

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to gizmo

Gremlin.Net
This repository only contains an outdated version of Gremlin.Net. For newer version head to Apache TinkerPop.
Stars: ✭ 21 (+5%)
Mutual labels:  gremlin, tinkerpop
gremlin-ogm
An Object Graph Mapping Library For Gremlin
Stars: ✭ 32 (+60%)
Mutual labels:  gremlin, tinkerpop
jelass
Janus + Elastic Search + Cassandra docker container with SSL Client Certificates implemented.
Stars: ✭ 13 (-35%)
Mutual labels:  gremlin, tinkerpop
Unipop
Data Integration Graph
Stars: ✭ 184 (+820%)
Mutual labels:  gremlin, tinkerpop
Ogre
Clojure library for querying Apache TinkerPop graphs
Stars: ✭ 118 (+490%)
Mutual labels:  gremlin, tinkerpop
Janusgraph
JanusGraph: an open-source, distributed graph database
Stars: ✭ 4,277 (+21285%)
Mutual labels:  gremlin, tinkerpop
gremtune
Golang Gremlin Tinkerpop client with AWS Neptune compatibility
Stars: ✭ 23 (+15%)
Mutual labels:  gremlin, tinkerpop
Exram.gremlinq
A .NET object-graph-mapper for Apache TinkerPop™ Gremlin enabled databases.
Stars: ✭ 84 (+320%)
Mutual labels:  gremlin, tinkerpop
Ferma
An ORM / OGM for the TinkerPop graph stack.
Stars: ✭ 130 (+550%)
Mutual labels:  gremlin, tinkerpop
Gremlin Javascript
JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
Stars: ✭ 209 (+945%)
Mutual labels:  gremlin, tinkerpop
Cypher For Gremlin
Cypher for Gremlin adds Cypher support to any Gremlin graph database.
Stars: ✭ 267 (+1235%)
Mutual labels:  gremlin, tinkerpop
Tinkerpop
Apache TinkerPop - a graph computing framework
Stars: ✭ 1,309 (+6445%)
Mutual labels:  gremlin, tinkerpop
janusgraph-docker
Yet another JanusGraph, Cassandra/Scylla and Elasticsearch in Docker Compose setup
Stars: ✭ 54 (+170%)
Mutual labels:  gremlin, tinkerpop
Goblin
A Python 3.5 rewrite of the TinkerPop 3 OGM Goblin
Stars: ✭ 90 (+350%)
Mutual labels:  gremlin, tinkerpop
Llvm2graphml
Explore LLVM Bitcode interactively using a graph database
Stars: ✭ 44 (+120%)
Mutual labels:  gremlin
virtualGizmo3D
Virtual GIZMO - 3D object manipulator / orientator, via mouse, with pan and dolly/zoom features
Stars: ✭ 36 (+80%)
Mutual labels:  gizmo
Express Cassandra
Cassandra ORM/ODM/OGM for Node.js with optional support for Elassandra & JanusGraph
Stars: ✭ 163 (+715%)
Mutual labels:  gremlin
Gremlin Scala
Scala wrapper for Apache TinkerPop 3 Graph DSL
Stars: ✭ 462 (+2210%)
Mutual labels:  gremlin
Exakat
The Exakat Engine : smart static analysis for PHP
Stars: ✭ 346 (+1630%)
Mutual labels:  gremlin
Janusgraph.cn
分布式图数据库 JanusGraph 中文社区,关于 JanusGraph 的一切
Stars: ✭ 273 (+1265%)
Mutual labels:  gremlin

Gizmo

Alpha build of this library. The API may change while working toward a stable release

Gizmo is a lightweight asynchronous Python 3.5+ Object Graph Mapper (O.G.M.) for the Tinkerpop Rexster graphs.

About

Gizmo starts and ends with Gremlin/Groovy. It is made up of entity, mapper, query, request, response, and other objects whose job is to convert pure Python to a Gremlin/Groovy string to be executed on a server.

QuickStart Example

    import asyncio

    from gizmo import Request, Vertex, Edge, Mapper, String

    from gremlinpy import Gremlin


    # setup the connection
    req = Request('localhost', 8182)
    gremlin = Gremlin('g') # this should be whatever your graph name is
    mapper = Mapper(request=req, gremlin=gremlin)


    # define a few entity classes
    class User(Vertex):
        name = String()


    class Knows(Edge):
        pass


    # create a few entities
    mark = User({'name': 'mark'})
    steve = User({'name': 'steve'})
    knows = mapper.connect(mark, steve, Knows)


    # Save your entities
    async def example():
        mapper.save(knows) # saving the edge will save users if they needed

        result = await mapper.send()

        # entities have been updated with response data from the graph
        print('mark: {}'.format(mark['id']))
        print('steve: {}'.format(steve['id']))
        print('knows: {}'.format(knows['id']))


    asyncio.get_event_loop().run_until_complete(example())


    # or write a custom query

    async def custom():
        g = Gremlin()
        g.V()

        result = await mapper.query(gremlin=g)

        print(result) # gizmo.mapper.Collection object
        print(result[0]) # user object (because of the queries in prev example)

    asyncio.get_event_loop().run_until_complete(custom())


    # do whatever Gremlin/Groovy allows you to do

    async def random_java():
        script = 'def x = new Date(); x'

        r = await mapper.query(script=script)

        print(r[0]['response'].value) # whatever x evaluates to

    asyncio.get_event_loop().run_until_complete(random_java())

Running tests

Test can be run via the setup file or directly with python -m.

python setup.py test

or

python -m unittest gizmo.test.entity
python -m unittest gizmo.test.mapper
python -m unittest gizmo.test.integration.tinkerpop
...

If you're going to run the integration tests, right now, both the name of the graph and the port are hard-coded into the suite. Make sure your Gremlin and Titan server use these settings:

tinkerpop

  • graph: gizmo_testing
  • port: 8182

titan

  • graph: gizmo_testing
  • port: 9192
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].