Questions tagged [bulbs]

Open-source Python graph-database library that supports any TinkerPop/Blueprints graph DB via the Rexster graph server (almost all graph DBs). Has a native client for Neo4j Server and Titan. Supports the Gremlin and Cypher graph query languages. Easily extendable to support any server backend or query language.

Bulbs is an open-source Python library for graph databases. It supports any graph database that implements Blueprints (i.e. almost all graph databases plus some NoSQL datastores that aren't graph databases -- see the Blueprints page for a list).

Bulbs supports the Gremlin query language and Neo4j's Cypher query language, and it has built-in support for three graph-database servers: Rexster, Neo4j Server, and Titan.

You can easily extend Bulbs to support any backend server or any query language by simply implementing the client adapter.

James Thornton is the lead developer. You may know him as espeed on SO, HN, Twitter, etc.

James is a TinkerPop member and is managing and co-authoring the the writing of the TinkerPop Book, which will be a comprehensive guide showing you how to build powerful graph-based applications using the TinkerPop stack and its related open-source graph technologies.

See the TinkerPop Book website's Resources section for an updated collection of videos, books, blogs, and papers on graph programming.

Here are the key pages you need to get started with Bulbs:

See these Stack Overflow answers for additional detailed examples/explanations on how Bulbs is designed and how to create custom models:

NB: Some people refer to the library as Bulbflow, but this is imprecise. Bulbflow is the site, while Bulbs is the library.

81 questions
3
votes
2 answers

Bulbs: How to check if two vertices are connected by an edge in Titan

I am using TitanGraphDB + Cassandra.I am starting Titan as follows cd titan-cassandra-0.3.1 bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties I have a Rexster shell that I can use to communicate to…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
3
votes
1 answer

Using Titan Graph database from Python

I am attempting to model a network topology using Titan Graph DB.I want to specify the topology from a python application. I have a java interface file that uses tinkertop frames annotation.An example structure is given below. public interface…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
3
votes
1 answer

Selective indexing in bulbflow without using Models

I'm using bulbflow (python) with Neo4j and I'm trying to add an index only on a subset of my keys (for now, simply keys named 'name' for optional index-based lookup). I don't love the bulbflow Models (too restrictive) and I couldn't figure out how…
user2588754
  • 95
  • 1
  • 5
3
votes
1 answer

Proper way to update Edges in Bulbs (neo4j or titan)

I'm experimenting with Bulbs to interface with a graph database. ( Production will use Titan, locally Neo4j seems best for experimenting ). I can't wrap my head around this concept... Bulbs shows how to create new Vertices... >>> james =…
Jonathan Vanasco
  • 15,111
  • 10
  • 48
  • 72
3
votes
2 answers

What format to use for storing graphs

I am working on a project which involves working with graphs extracted from some other source. Currently we are using python's networkx module for analysing the graph. I am now faced with the task of choosing a format for storing the graphs. Pickle…
nofrills
  • 101
  • 3
2
votes
2 answers

Python and graph database. Use java lib wrapper or REST api?

I want to ask you about the best way to use graph database (Neo4j) in Python. What you think, should I use "neo4j/python-embedded" (neo4j/python-embedded with JPype) or maybe "bulbflow" (bulbflow, with Rexster, Gremlin and REST api)? Is REST api…
User
  • 1,978
  • 5
  • 26
  • 47
2
votes
1 answer

Bulbs/Neo4j: authentication error when creating Graph object

I'm a newbie and trying to learn Python, Bulbs, Neo4j. I have no idea how to debug this problem that occurs at the very start when I just try to create a Graph object. Here's the traceback: File "test.py", line 12, in __init__ self.graph =…
2
votes
1 answer

Python Bulbs framework example of fget argument in a bulbs object init method

What is the scope of the fget= argument upon initialization of a Bulbs class property? For instance when I am writing: from bulbs.model import Node, Relationship from bulbs.property import String class foobar(Node) element_type = "foobar" …
chiffa
  • 2,026
  • 3
  • 26
  • 41
2
votes
2 answers

Bulbs: g.scripts.update() : TypeError: sequence item 2: expected string or Unicode, NoneType found

I'm using TitanGraphDB + Cassandra. I'm starting Titan as follows cd titan-cassandra-0.3.1 bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties I have a Rexster shell that I can use to communicate to Titan +…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
2
votes
1 answer

possible to connect to multiple neo4j databases via bulbs/Rexster?

I would like to be able to specify the neo4j (2.0+) database folder when I open a connection to a graph using bulbs. The goal is to be able to open different or multiple neo4j databases (folders in data/) on the same machine without starting the…
Ziggy Eunicien
  • 2,858
  • 1
  • 23
  • 28
2
votes
1 answer

Bulbs: replacing create() with get_or_create()

I am using TitanGraphDB + Cassandra.I am starting Titan as follows cd titan-cassandra-0.3.1 bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties I have a Rexster shell that I can use to communicate to…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
2
votes
1 answer

Rexster OrientDB configuration

i'm trying to setup Rexster (version 2.5) to work with OrientDB (1.7 rc2). The problem is that i don't know what should i put in the field in the graph configuration. Most recent Rexster documentation…
siphiuel
  • 3,480
  • 4
  • 31
  • 34
2
votes
1 answer

Error importing Graph from bulbs.neo4jserver in Python

I am trying to run neo4j using gremlin. I am following one of the first examples in the bulbs documentation, trying to import bulbs.neo4jserver .Graph. I can import bulbs, it sees gremlin, but fails to import Graph using the command below. >>>…
2
votes
2 answers

Get unique set of adjacent vertices in python bulbs or gremlin?

Using python, bulbs, and rexster Say I have two vertices, v0 and v1. And I create 3 outgoing edges from v0 -to-> v1. Currently in bulbs, list(v0.outV()) gives me a 3 element list, all of v1. Is there a way to get the unique list of v0.outV() in…
Derek
  • 11,980
  • 26
  • 103
  • 162
2
votes
1 answer

How to define function in gremlin that returns the same result as in gremlin shell?

I'm currently using TinkerPop Gremlin (with a Titan backend) to implement a "similar document" algorithm. The next lines are working perfectly well in gremlin shell : v = g.v(880068) m=[:] v.as('x').out('auto_tag').in('auto_tag').has('status',…
Raphaël Braud
  • 1,489
  • 10
  • 14