{ "info": { "author": "Lincoln de Sousa, F\u00e1bio M. Costa", "author_email": "lincoln@yipit.com, fabio@yipit.com", "bugtrack_url": null, "classifiers": [], "description": "# Suggestive\n\nMagically add auto-complete to your python project.\n\nSuggestive is a very simple python library that allows you to easily add the\nauto-complete feature to your project. It works for any kind of python project,\neven if it's not web based.\n\n## Talk is cheap show me the code\n\nWell, usually you have follow two steps to get your auto-complete running\nproperly. First, you need to index things, then you can search for them. Let's\nsee examples for both steps separately.\n\n### Indexing\n```python\n>>> data = [\n... {\"id\": 0, \"name\": \"Lincoln\", \"score\": 123},\n... {\"id\": 1, \"name\": \"Livia\", \"score\": 12345},\n... {\"id\": 5, \"name\": \"Linus\", \"score\": 123456}, # Rita's brother! :)\n... ]\n>>> import redis\n>>> from suggestive import Suggestive, RedisBackend\n>>> s = Suggestive('names', RedisBackend(conn=redis.StrictRedis()))\n>>> s.index(data, field='name')\n```\n\nThat's it. Your data is cached inside of `redis`.\n\n### Querying\n\nThings are fairly easier in this step. You just need to setup the suggestive\ninstance and use the `suggest` method:\n\n```python\n>>> import redis\n>>> from suggestive import Suggestive, RedisBackend\n>>> s = Suggestive('names', RedisBackend(conn=redis.StrictRedis()))\n>>> s.suggest('lin')\n[{u'score': 123456, u'id': 5, u'name': u'Linus'}, {u'score': 123, u'id': 0, u'name': u'Lincoln'}]\n```\n\n### Outro\n\nOur API is not pretty stable yet, the way we choose the pass the backend\ninstance to the `Suggestive` instance will be changed to use a `uri`. But\nwe will definitely keep the compatibility with this version, since it\nmakes things way easier when writing tests.\n\nThere are some very simple things that we're not doing either, like adding\nlimit and offset parameters to the `suggest()` method. We're planning to\nadd this feature and some others as soon as the rest of the code gets more\nstable.", "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/Yipit/suggestive", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "suggestive", "package_url": "https://pypi.org/project/suggestive/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/suggestive/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Yipit/suggestive" }, "release_url": "https://pypi.org/project/suggestive/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Magically add auto complete to your python project", "version": "0.2.1" }, "last_serial": 800228, "releases": { "0.0.1": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1c47ce5cceb12ebf14f3fe72e7192c4f", "sha256": "5c6622e69b5ad6ea59cfac931e10be36fc6b72374961a4a5b723c8b419ec616c" }, "downloads": -1, "filename": "suggestive-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1c47ce5cceb12ebf14f3fe72e7192c4f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4225, "upload_time": "2013-04-30T21:19:08", "url": "https://files.pythonhosted.org/packages/df/e4/dac52b1aa848bc80bb0801b143c72a98942615ed29c63598d5ff9f184c0d/suggestive-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7cc2b7060f32ecf036e2c5b514e39c44", "sha256": "691d3c0cee040e3132e609300965ca840ae5be32061da3e3b35aabf8cd506063" }, "downloads": -1, "filename": "suggestive-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7cc2b7060f32ecf036e2c5b514e39c44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5531, "upload_time": "2013-05-01T16:56:58", "url": "https://files.pythonhosted.org/packages/01/33/7495934df41d59ba2647f2df784c6b7ab857627ec94ca105665f3393cf0a/suggestive-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a6a9a76725652089f7c72878fdd15c1b", "sha256": "b24e4b3841bc3d32a39e90c8d7ab3386961093fec561d92a475a59668bb51adb" }, "downloads": -1, "filename": "suggestive-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a6a9a76725652089f7c72878fdd15c1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5546, "upload_time": "2013-05-01T17:18:37", "url": "https://files.pythonhosted.org/packages/80/26/83951aa9b5f7244a9491bb0d0048ebe8060c3f37eba5c8f6edc3b569bd88/suggestive-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6a9a76725652089f7c72878fdd15c1b", "sha256": "b24e4b3841bc3d32a39e90c8d7ab3386961093fec561d92a475a59668bb51adb" }, "downloads": -1, "filename": "suggestive-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a6a9a76725652089f7c72878fdd15c1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5546, "upload_time": "2013-05-01T17:18:37", "url": "https://files.pythonhosted.org/packages/80/26/83951aa9b5f7244a9491bb0d0048ebe8060c3f37eba5c8f6edc3b569bd88/suggestive-0.2.1.tar.gz" } ] }