{ "info": { "author": "Jacob Hansson", "author_email": "jakewins@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3" ], "description": "=======\nNeo4jDB\n=======\n\nImplements the Python DB API 2.0 for Neo4j, compatible with python 2.6, 2.7,\n3.2 and 3.3 and Neo4j >= 2.0.0\n\nhttp://legacy.python.org/dev/peps/pep-0249/\n\n.. image:: https://travis-ci.org/jakewins/neo4jdb-python.svg?branch=master\n :target: https://travis-ci.org/jakewins/neo4jdb-python\n\n\nInstalling\n----------\n\n::\n\n pip install neo4jdb\n\nMinimum viable snippet\n----------------------\n\n::\n\n import neo4j\n\n connection = neo4j.connect(\"http://localhost:7474\")\n\n cursor = connection.cursor()\n for name, age in cursor.execute(\"MATCH (n:User) RETURN n.name, n.age\"):\n print name, age\n\nUsage\n-----\n\nThe library generally adheres to the DB API, please refer to the documentation\nfor the DB API for detailed usage.\n\n::\n\n # Write statements\n cursor.execute(\"CREATE (n:User {name:'Stevie Brook'}\")\n connection.commit() # Or connection.rollback()\n\n # With positional parameters\n cursor.execute(\"CREATE (n:User {name:{0}})\", \"Bob\")\n # or\n l = ['Bob']\n cursor.execute(\"CREATE (n:User {name:{0}})\", *l)\n\n # With named parameters\n cursor.execute(\"CREATE (n:User {name:{name}})\", name=\"Bob\")\n # or\n d = {'name': 'Bob'}\n cursor.execute(\"CREATE (n:User {name:{name}})\", **d)\n # or\n d = {'node': {'name': 'Bob'}}\n cursor.execute(\"CREATE (n:User {node})\", **d)\n\n\nIf you ask Cypher to return Nodes or Relationships, these are represented as Node and Relationship types, which\nare `dict` objects with additional metadata for id, labels, type, end_id and start_id.\n\n::\n\n # Retrieve and access a node\n for node, in cursor.execute(\"MATCH (n) RETURN n\"):\n print node.id, node.labels\n print node['a_property']\n\n # Retrieve and access a relationship\n for rel, in cursor.execute(\"MATCH ()-[r]->() RETURN r\"):\n print rel.id, rel.type, rel.start_id, rel.end_id\n print rel['a_property']\n\n\nUsing the context manager. Any exception in the context will result in the exception being thrown and the transaction to be rolled back.\n\n::\n\n from neo4j.contextmanager import Neo4jDBConnectionManager\n manager = contextmanager.Neo4jDBConnectionManager('http://localhost:7474')\n\n with manager.read as r: # r is just a cursor\n for name, age in r.execute(\"MATCH (n:User) RETURN n.name, n.age\"):\n print name, age\n # When leaving read context the transaction will be rolled back\n\n with manager.write as w:\n w.execute(\"CREATE (n:User {name:{name}})\", name=\"Bob\")\n # When leaving write context the transaction will be committed\n\n # When using transaction a new connection will be created\n with manager.transaction as t:\n t.execute(\"CREATE (n:User {name:{name}})\", name=\"Bob\")\n # When leaving transaction context the transaction will be\n # committed and the connection will be closed\n\n # Rolling back or commit in contexts\n with manager.transaction as t:\n t.execute(\"CREATE (n:User {name:{name}})\", name=\"Bob\")\n if something == True:\n t.connection.commit() # This will commit the transaction\n else:\n t.connection.rollback() # This will rollback the transaction\n\n\nBuilding & Testing\n------------------\n\nNeo4jDB uses paver as its build system. To install paver::\n\n pip install paver\n\nThen you can build Neo4jDB with::\n\n paver build\n\nAnd install it with::\n\n paver install\n\n\nRunning tests requires a Neo4j server running on localhost. Paver can handle\nthis for you::\n\n paver start_server\n paver nosetests\n paver stop_server\n\n \nIncompliance with the spec\n--------------------------\n\n**Parameters**\n\nThe library delegates to Neo4j for parameter substitution, which means it does\nnot use any of the standard parameter substitution types defined in the spec. \n\nInstead it uses curly brackets with named and/or positional parameters::\n\n {0} or {identifier}\n\n\n**Type system**\n\nBecause the wire format for Neo4j is JSON, the library does not support the \ndate or binary value types. This may change in the future as the wire format\nfor Neo4j evolves.\n\nIn a similar vein, because Neo4j is a schema-optional database, it may return\narbitrary types in each cell in the result table. As such, the description of the\nresult table always marks each column type as neo4j.MIXED.\n\n\nLicense\n-------\n\nhttp://opensource.org/licenses/MIT", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jakewins/neo4jdb-python", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "neo4jdb", "package_url": "https://pypi.org/project/neo4jdb/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/neo4jdb/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jakewins/neo4jdb-python" }, "release_url": "https://pypi.org/project/neo4jdb/0.0.9/", "requires_dist": null, "requires_python": null, "summary": "DB API 2.0 driver for the Neo4j graph database.", "version": "0.0.9" }, "last_serial": 1833545, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7bd3163ec6419efd89e09d253f2dfab5", "sha256": "478a9f2b5e72fde6b9a8a290899bd01269423c0645e5d8b5b4dd5ac6c7b0ca5b" }, "downloads": -1, "filename": "neo4jdb-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7bd3163ec6419efd89e09d253f2dfab5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5636, "upload_time": "2014-03-21T17:16:50", "url": "https://files.pythonhosted.org/packages/c6/73/d74f0e67a0b3a2f954018d61bd92f36565108401b9977ad87c2d819b6736/neo4jdb-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "94ff516985c3db91750a97603936ff0e", "sha256": "5cd6ced483e1f4a3513213b60512693f418f60b4b47141c5ab55cafea996daa1" }, "downloads": -1, "filename": "neo4jdb-0.0.2.tar.gz", "has_sig": false, "md5_digest": "94ff516985c3db91750a97603936ff0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5748, "upload_time": "2014-03-21T17:30:50", "url": "https://files.pythonhosted.org/packages/be/71/4212cef40f68fe54de8382b3ef37dac8efb849ae6df663c12c513563ad8b/neo4jdb-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "086f2436f2c31fbe5c5ce933d9848fd3", "sha256": "5a5db03380d7e3598d1693bc1ed375caaeaa3fa57934eebbb5d8432b425404f8" }, "downloads": -1, "filename": "neo4jdb-0.0.3.tar.gz", "has_sig": false, "md5_digest": "086f2436f2c31fbe5c5ce933d9848fd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6403, "upload_time": "2014-03-22T04:32:01", "url": "https://files.pythonhosted.org/packages/ee/7a/083d0625adaf0f512bd6502af1142fc0d7afe4dce95fbb4caf37b39c7917/neo4jdb-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "f79646c849a022456563510ec077bcc0", "sha256": "48b1b88d84597937c34d4d6a20fa1e0d7060c9438fdca4671446047d40f81705" }, "downloads": -1, "filename": "neo4jdb-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f79646c849a022456563510ec077bcc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6575, "upload_time": "2014-03-23T15:14:09", "url": "https://files.pythonhosted.org/packages/df/e0/f31a4ef153b2cf133c0939d527a680a68784e6c2cf9a447760ed205ba658/neo4jdb-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "afba76e659b8be3c42e35ccb8c0be5e0", "sha256": "c5fae5e25b977fbed7a6daf4d9506e12f0bca419011eacbc54a1ade4fb4eb20a" }, "downloads": -1, "filename": "neo4jdb-0.0.5.tar.gz", "has_sig": false, "md5_digest": "afba76e659b8be3c42e35ccb8c0be5e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6966, "upload_time": "2014-04-03T15:00:57", "url": "https://files.pythonhosted.org/packages/00/35/03a3dbcd052bfc76d4d2b9ec21c524de2a8d6424c1681493152c74a7f748/neo4jdb-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "44109f2d66b9cab05dceb6ecfb66066f", "sha256": "b4ad7bd84f576613c9f00fc561c8e38d2d98d98186894279fa851ee55433bef3" }, "downloads": -1, "filename": "neo4jdb-0.0.6.tar.gz", "has_sig": false, "md5_digest": "44109f2d66b9cab05dceb6ecfb66066f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8239, "upload_time": "2014-05-26T12:14:49", "url": "https://files.pythonhosted.org/packages/0f/0e/1aea9743829b9a481522d8989861c054e6d2cd492a54633158019ce9c8ba/neo4jdb-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "28a626ff58e9f9916524dd852684433c", "sha256": "9deb2d9fdf36913dfe81b837d0d643d6392ff38979d7ffafeb2860cb69bfebae" }, "downloads": -1, "filename": "neo4jdb-0.0.7.tar.gz", "has_sig": false, "md5_digest": "28a626ff58e9f9916524dd852684433c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8601, "upload_time": "2014-09-30T14:39:08", "url": "https://files.pythonhosted.org/packages/de/36/29e384336956c720adbf3f2ee0ef134f8b48817a04057d8bb03d8733c717/neo4jdb-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "fecbec46c6e5a93c3a85543eadbda7c0", "sha256": "3c383028474c7b0a113de83fee6bf6b96d0da7b57c2309a8eca9d0ab9c5f0c85" }, "downloads": -1, "filename": "neo4jdb-0.0.8.tar.gz", "has_sig": false, "md5_digest": "fecbec46c6e5a93c3a85543eadbda7c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51898, "upload_time": "2014-10-21T18:13:34", "url": "https://files.pythonhosted.org/packages/4c/71/eb872a7e27f76e32e138cd64e7ba721c78c565f6e2462f9f84235f493298/neo4jdb-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "50949f080b261b2eea9d762c16be9a5a", "sha256": "0efb56e5c92caddcee8a18a0ef5c8676d9c1c6f1b61b8f9a7b2c10aa6406f589" }, "downloads": -1, "filename": "neo4jdb-0.0.9.tar.gz", "has_sig": false, "md5_digest": "50949f080b261b2eea9d762c16be9a5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54221, "upload_time": "2015-11-25T17:58:23", "url": "https://files.pythonhosted.org/packages/8e/ca/0943f6223deade647ada47feb8917d81e742ac4e4ccb405c8f7a90ce28de/neo4jdb-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50949f080b261b2eea9d762c16be9a5a", "sha256": "0efb56e5c92caddcee8a18a0ef5c8676d9c1c6f1b61b8f9a7b2c10aa6406f589" }, "downloads": -1, "filename": "neo4jdb-0.0.9.tar.gz", "has_sig": false, "md5_digest": "50949f080b261b2eea9d762c16be9a5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54221, "upload_time": "2015-11-25T17:58:23", "url": "https://files.pythonhosted.org/packages/8e/ca/0943f6223deade647ada47feb8917d81e742ac4e4ccb405c8f7a90ce28de/neo4jdb-0.0.9.tar.gz" } ] }