{"id":18232851,"url":"https://github.com/wgwz/flask-py2neo","last_synced_at":"2025-04-03T18:31:59.942Z","repository":{"id":45951755,"uuid":"91704548","full_name":"wgwz/flask-py2neo","owner":"wgwz","description":"integration of py2neo with flask","archived":false,"fork":false,"pushed_at":"2021-11-25T03:57:33.000Z","size":9,"stargazers_count":12,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T12:21:17.567Z","etag":null,"topics":["flask","neo4j","py2neo"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wgwz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-18T14:41:01.000Z","updated_at":"2022-01-23T00:08:29.000Z","dependencies_parsed_at":"2022-08-28T13:41:22.916Z","dependency_job_id":null,"html_url":"https://github.com/wgwz/flask-py2neo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgwz%2Fflask-py2neo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgwz%2Fflask-py2neo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgwz%2Fflask-py2neo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgwz%2Fflask-py2neo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wgwz","download_url":"https://codeload.github.com/wgwz/flask-py2neo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247056730,"owners_count":20876448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","neo4j","py2neo"],"created_at":"2024-11-04T14:04:14.382Z","updated_at":"2025-04-03T18:31:59.652Z","avatar_url":"https://github.com/wgwz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-Py2Neo\n\nFlask-Py2Neo is mostly a connection utility. The aim is to get you up and running as quickly as possible. It also aims to use best-practices in terms of how the connection is made between `py2neo` and your Neo4j instance.\n\n## Quickstart\n\nHere is a quickstart guide. It shows how to initialize and make use of the extension.\n\nTo initialize in an application module:\n\n```python\nfrom flask import Flask, jsonify\nfrom flask_py2neo import Py2Neo\n\napp = Flask(__name__)\ndb = Py2Neo(app)\n```\n\nOr this pattern:\n\n```python\nfrom flask import Flask, jsonify\nfrom flask_py2neo import Py2Neo\n\napp = Flask(__name__)\ndb = Py2Neo()\ndb.init_app(app)\n```\n\nThen define some view functions:\n\n```python\n@app.route('/create/\u003cstring:name\u003e')\ndef create(name):\n    db.graph.run(\"CREATE (n:User {name: '%s'})\" % name) # noqa\n    return jsonify('user %s created' % name)\n\n@app.route('/list/')\ndef list():\n    return jsonify(db.graph.run(\"MATCH (n:User) RETURN n\").data())\n```\n\n## Object-Graph Mapper\n\n```python\nfrom py2neo.ogm import GraphObject, Property\n\nclass Post(GraphObject):\n\n    title = Property()\n\npost = Post()\npost.title = 'my first post'\n\ndb.graph.push(post)\n```\n\n## References\n\n- py2neo v3 Handbook: http://py2neo.org/v3/\n- py2neo v4 Handbook: http://py2neo.org/v4/\n- py2neo v3 OGM: http://py2neo.org/v3/ogm.html\n- py2neo v4 OGM: http://py2neo.org/v4/ogm.html\n- py2neo: https://github.com/technige/py2neo\n- Flask: https://github.com/pallets/flask\n\n## Useful tidbits\n\n- Cypher Ref Card: https://neo4j.com/docs/cypher-refcard/current/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwgwz%2Fflask-py2neo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwgwz%2Fflask-py2neo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwgwz%2Fflask-py2neo/lists"}