{ "info": { "author": "Robin Edwards", "author_email": "robin.ge@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Neomodel (beta!)\n=======================\n\n.. image:: https://raw.githubusercontent.com/robinedwards/neomodel/master/doc/source/_static/neomodel-300.png\n :alt: neomodel\n\nThis module allows you to use the neo4j_ graph database with Django using neomodel_\n\n.. _neo4j: https://www.neo4j.org\n.. _neomodel: http://neomodel.readthedocs.org\n\n.. image:: https://secure.travis-ci.org/robinedwards/django-neomodel.png\n :target: https://secure.travis-ci.org/robinedwards/django-neomodel/\n\nGetting started\n===============\n\nInstall the module::\n\n $ pip install django_neomodel\n\nAdd the following settings to your `settings.py`::\n\n NEOMODEL_NEO4J_BOLT_URL = os.environ.get('NEO4J_BOLT_URL', 'bolt://neo4j:test@localhost:7687')\n\n # Make sure django_neomodel comes before your own apps\n INSTALLED_APPS = (\n # django.contrib.auth etc\n 'django_neomodel',\n 'yourapp'\n )\n\nWrite your first node definition in `yourapp/models.py`::\n\n from neomodel import StructuredNode, StringProperty, DateProperty\n\n class Book(StructuredNode):\n title = StringProperty(unique_index=True)\n published = DateProperty()\n\nCreate any constraints or indexes for your labels. This needs to be done after you change your node definitions\nmuch like `manage.py migrate`::\n\n $ python manage.py install_labels\n\nNow in a view `yourapp/views.py`::\n\n from .models import Book\n\n def get_books(request):\n return render('yourapp/books.html', request, {'books': Book.nodes.all()})\n\nAnd you're ready to go. Don't forget to check the neomodel_ documentation.\n\nModel forms\n===========\n\nSwitch the base class from `StructuredNode` to `DjangoNode` and add a 'Meta' class::\n\n from datetime import datetime\n from django_neomodel import DjangoNode\n from neomodel import StructuredNode, StringProperty, DateTimeProperty, UniqueIdProperty\n\n class Book(DjangoNode):\n uid = UniqueIdProperty()\n title = StringProperty(unique_index=True)\n status = StringProperty(choices=(\n ('Available', 'A'),\n ('On loan', 'L'),\n ('Damaged', 'D'),\n ), default='Available')\n created = DateTimeProperty(default=datetime.utcnow)\n\n class Meta:\n app_label = 'library'\n\nCreate a model form class for your `DjangoNode`::\n\n class BookForm(ModelForm):\n class Meta:\n model = Book\n fields = ['title', 'status']\n\nThis class may now be used just like any other Django form.\n\nSettings\n========\nThe following config options are available in django settings (default values shown).\nThese are mapped to neomodel.config as django is started::\n\n NEOMODEL_NEO4J_BOLT_URL = 'bolt://neo4j:neo4j@localhost:7687'\n NEOMODEL_SIGNALS = True\n NEOMODEL_FORCE_TIMEZONE = False\n NEOMODEL_ENCRYPTED_CONNECTION = True\n NEOMODEL_MAX_POOL_SIZE = 50\n\nSignals\n=======\nSignals work with `DjangoNode` sub-classes::\n\n from django.db.models import signals\n from django_neomodel import DjangoNode\n from neomodel import StringProperty\n\n class Book(DjangoNode):\n title = StringProperty(unique_index=True)\n\n def your_signal_func(sender, instance, signal, created):\n pass\n\n signals.post_save.connect(your_signal_func, sender=Book)\n\nThe following are supported: `pre_save`, `post_save`, `pre_delete`, `post_delete`.\nOn freshly created nodes `created=True` in the `post_save` signal argument.\n\nTesting\n=======\n\nYou can create a setup method which clears the database before executing each test::\n\n from neomodel import db, clear_neo4j_database\n\n class YourTestClass(DjangoTestCase):\n def setUp(self):\n clear_neo4j_database(db)\n\n def test_something(self):\n pass\n\nManagement Commands\n===================\n\nThe following django management commands have been included.\n\ninstall_labels\n--------------\nSetup constraints and indexes on labels for your node definitions. This should be executed after any schema changes::\n\n $ python manage.py install_labels\n Setting up labels and constraints...\n\n Found tests.someapp.models.Book\n + Creating unique constraint for title on label Book for class tests.someapp.models.Book\n\n Finished 1 class(es).\n\nclear_neo4j\n-----------\nDelete all nodes in your database, warning there is no confirmation!\n\nRequirements\n============\n\n- Python 2.7, 3.4+\n- neo4j 3.0+\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :alt: Join the chat at https://gitter.im/robinedwards/neomodel\n :target: https://gitter.im/robinedwards/neomodel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/robinedwards/django-neomodel", "keywords": "neo4j django plugin neomodel", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django_neomodel", "package_url": "https://pypi.org/project/django_neomodel/", "platform": "", "project_url": "https://pypi.org/project/django_neomodel/", "project_urls": { "Homepage": "http://github.com/robinedwards/django-neomodel" }, "release_url": "https://pypi.org/project/django_neomodel/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Use Neo4j with Django!", "version": "0.0.4" }, "last_serial": 2940362, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9020ae65e246091e2f5a91ab5ee1e212", "sha256": "c74daca10f7494b907fc518a3b2c171fdc5513b903ae97175d5376a732b46495" }, "downloads": -1, "filename": "django_neomodel-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "9020ae65e246091e2f5a91ab5ee1e212", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14504, "upload_time": "2017-01-27T12:21:33", "url": "https://files.pythonhosted.org/packages/39/92/0e7a0d712b7e4b1c2a466a10466b2f5bfcad072715af6a1b1ef6eb87e6e0/django_neomodel-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0182008fdf18514817936b7c210d9850", "sha256": "f519886f5e4e5337becf760583f13e7c92707e9d58bbc58b78a53b451a6296d4" }, "downloads": -1, "filename": "django_neomodel-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0182008fdf18514817936b7c210d9850", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8759, "upload_time": "2017-01-27T12:21:28", "url": "https://files.pythonhosted.org/packages/fc/32/d1053a9d9276e8cd720a22309491195fb2655e3f77c1d9638cb2af2ffdec/django_neomodel-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4597933cb478e6398a0c2d57be776671", "sha256": "5d8beba50998a3d8bd17c1e7761d97109eed9e8c288a7b79392ae6cb8106e8d6" }, "downloads": -1, "filename": "django_neomodel-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "4597933cb478e6398a0c2d57be776671", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14942, "upload_time": "2017-02-07T11:40:15", "url": "https://files.pythonhosted.org/packages/e6/e3/2bffdc5f46f4cd78f97a1f5f0b3e9324e95eb930d06626085b22f6eb2034/django_neomodel-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1e437797b386a234284b00797eb9337c", "sha256": "fcdc82cb19d26f8771bda162603abefa32dafabfd6e5c853f74d015665f0a815" }, "downloads": -1, "filename": "django_neomodel-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1e437797b386a234284b00797eb9337c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9149, "upload_time": "2017-02-07T11:40:08", "url": "https://files.pythonhosted.org/packages/39/9c/1c1c6534e54221d7cc16b4456a7befd01b49ef60b7957557cbdbc1531f8c/django_neomodel-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "0f0fa839b198baed1b0aa6d486877f33", "sha256": "ebf70460ebcaad67bedba23bc01fa1df07d180aadc55bee4ec395a41ad429197" }, "downloads": -1, "filename": "django_neomodel-0.0.3.tar.gz", "has_sig": false, "md5_digest": "0f0fa839b198baed1b0aa6d486877f33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9214, "upload_time": "2017-02-19T10:08:28", "url": "https://files.pythonhosted.org/packages/62/3b/b6646403db2e2f47fb27a24bb003647a541ea06a7cd87ae6f543c7ef0b38/django_neomodel-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "e0322308dd4c4787f7f5bc901e0d4489", "sha256": "2a51fc5754e45b959e5fb82d1ae2b1fa9702edf5ea5b9c99272781f0fa32955d" }, "downloads": -1, "filename": "django_neomodel-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e0322308dd4c4787f7f5bc901e0d4489", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15022, "upload_time": "2017-06-10T14:21:25", "url": "https://files.pythonhosted.org/packages/3b/aa/6d4e928a80c76f37e88c9f0e8da67fc1bc9c28ad2924610cde3b30ca8a53/django_neomodel-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4b45aa686a94262c3312c3a0ed7b65f9", "sha256": "927e1eac7943b37b41da17de4559138e50c9ee7e0f7f0e6bf04223b0ac0fcccf" }, "downloads": -1, "filename": "django_neomodel-0.0.4.tar.gz", "has_sig": false, "md5_digest": "4b45aa686a94262c3312c3a0ed7b65f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9351, "upload_time": "2017-06-10T14:21:24", "url": "https://files.pythonhosted.org/packages/88/2f/5f5355ad7afb650acf11ef9317144db557582399a1ecc6106d0d1deab510/django_neomodel-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0322308dd4c4787f7f5bc901e0d4489", "sha256": "2a51fc5754e45b959e5fb82d1ae2b1fa9702edf5ea5b9c99272781f0fa32955d" }, "downloads": -1, "filename": "django_neomodel-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e0322308dd4c4787f7f5bc901e0d4489", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15022, "upload_time": "2017-06-10T14:21:25", "url": "https://files.pythonhosted.org/packages/3b/aa/6d4e928a80c76f37e88c9f0e8da67fc1bc9c28ad2924610cde3b30ca8a53/django_neomodel-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4b45aa686a94262c3312c3a0ed7b65f9", "sha256": "927e1eac7943b37b41da17de4559138e50c9ee7e0f7f0e6bf04223b0ac0fcccf" }, "downloads": -1, "filename": "django_neomodel-0.0.4.tar.gz", "has_sig": false, "md5_digest": "4b45aa686a94262c3312c3a0ed7b65f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9351, "upload_time": "2017-06-10T14:21:24", "url": "https://files.pythonhosted.org/packages/88/2f/5f5355ad7afb650acf11ef9317144db557582399a1ecc6106d0d1deab510/django_neomodel-0.0.4.tar.gz" } ] }