{ "info": { "author": "asyncee", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Indexing/Search" ], "description": "This is Django application that helps intergrate Django with elasticsearch.\nIt is built on top of ``elasticsearch-dsl``.\n\n---------------\n\n|python| |pypi| |license|\n\n---------------\n\n\nProject aims to support Python 3 and Django 1.8 (at least).\n\nThe library is in development, use it carefully, because until stable an API\nis a subject to change.\n\n\nQuickstart\n----------\n\nConfigure your models to be indexable::\n\n from django.db import models\n from el.models import Indexed\n\n class Article(models.Model, Indexed):\n title = models.CharField(max_length=78)\n\n @classmethod\n def get_indexable(cls):\n return cls.objects.all()\n\n @classmethod\n def configure_mapping(cls, mapping):\n # mapping is an elasticsearch_dsl Mapping object\n mapping.field('title', 'string')\n return mapping\n\n\nFrom this moment, the ``Article`` model will be autodiscovered and indexed.\n\n\nUpdate search indexes::\n\n ./manage.py update_index\n\n\nUse ``elasticsearch_dsl`` to query::\n\n # articles is a list of an Article instances\n articles = Article.search().query('match', title=\"Bob's article\").execute()\n\n # articles is a list of elasticsearch_dsl hits\n articles = Article.search().query('match', title=\"Bob's article\").execute(cast=False)\n\n\nIn contrast with ``elasticsearch_dsl``, ``django-el`` provides modified\n``Search`` object which return django model instances instead of raw\nelasticsearch results by default. You can control this feature using the\n``cast`` argument.\n\n\nInstallation\n------------\n\nInstall ``django-el`` as usual python package using pip::\n\n pip install django-el\n\n\nConfiguration\n-------------\n\nDjango-el is build on top of ``elasticsearch_dsl`` library and provides\ndjango-way connections configuration through ``settings.py``::\n\n ELASTICSEARCH_CONNECTIONS = {\n 'default': {\n 'hosts': ['127.0.0.1:9200'],\n 'serializer': 'project.serializers.MySerializer',\n }\n }\n\nYou can define project connections using ``ELASTICSEARCH_CONNECTIONS``\nsetting. It is just a hight-level interface over low-level\n``elasticsearch_dsl.connections.connections.create_connection`` function.\n\nThe keys are (default, in this example) are connection aliases, and it's values\nare ``create_connection`` arguments.\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/django-el.svg?style=flat-square\n :target: https://pypi.python.org/pypi/django-el\n :alt: pypi\n\n.. |license| image:: https://img.shields.io/github/license/asyncee/django-el.svg?style=flat-square\n :target: https://github.com/asyncee/django-el/blob/master/LICENSE.txt\n :alt: MIT License\n\n.. |python| image:: https://img.shields.io/badge/python-3.x-blue.svg?style=flat-square\n :target: https://pypi.python.org/pypi/django-el\n :alt: 3.x", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/django-el/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/asyncee/django-el", "keywords": "django elasticsearch", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-el", "package_url": "https://pypi.org/project/django-el/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-el/", "project_urls": { "Download": "https://pypi.python.org/pypi/django-el/", "Homepage": "https://github.com/asyncee/django-el" }, "release_url": "https://pypi.org/project/django-el/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Django elasticsearch integration.", "version": "0.2.2" }, "last_serial": 1822903, "releases": { "0.1": [], "0.2": [ { "comment_text": "", "digests": { "md5": "2ae9f402a3476758bbc186916f3c60ec", "sha256": "c28deba5700a5de25f7c0869a6d72d620219cd1b7290379550b98912e12e2a7e" }, "downloads": -1, "filename": "django-el-0.2.tar.gz", "has_sig": false, "md5_digest": "2ae9f402a3476758bbc186916f3c60ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6925, "upload_time": "2015-11-13T12:56:18", "url": "https://files.pythonhosted.org/packages/93/a5/d65199b872002c708303be588becc5b7f46eb86bbeba7a0bf5978a8230fc/django-el-0.2.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "6f8ae4aa8ee924147c12dfa6d94d882a", "sha256": "61fc64def31e53358d0fb45fb37b89bb2ef2ddbf76dd9c5eda1a881593549b01" }, "downloads": -1, "filename": "django-el-0.2.2.tar.gz", "has_sig": false, "md5_digest": "6f8ae4aa8ee924147c12dfa6d94d882a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2015-11-18T17:04:10", "url": "https://files.pythonhosted.org/packages/6a/3f/e89c2940412a2e56a2dfb4a59725efa64941f6da968cbfd7fc9f9db16078/django-el-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6f8ae4aa8ee924147c12dfa6d94d882a", "sha256": "61fc64def31e53358d0fb45fb37b89bb2ef2ddbf76dd9c5eda1a881593549b01" }, "downloads": -1, "filename": "django-el-0.2.2.tar.gz", "has_sig": false, "md5_digest": "6f8ae4aa8ee924147c12dfa6d94d882a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2015-11-18T17:04:10", "url": "https://files.pythonhosted.org/packages/6a/3f/e89c2940412a2e56a2dfb4a59725efa64941f6da968cbfd7fc9f9db16078/django-el-0.2.2.tar.gz" } ] }