{ "info": { "author": "Florian Scholz", "author_email": "livint@posteo.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Install\n-------\n\nMyNLQ\u2019s source code hosted on `GitHub `_.\n\n.. code-block:: bash\n\n git clone https://github.com/livinter/MyNQL.git\n python setup.py install\n\nor just\n\n.. code-block:: bash\n\n pip install MyNQL\n\nTeach the Network\n-----------------\n\nFor example if a customer make a purchase of a product you assume a relation between ``customer.id`` and ``product.id``,\nso you connect them. Optional you can specify a distance between nodes, to represent how close the nodes are related.\n\n* ``connect`` - connect two nodes\n* ``delete`` - delete a connection\n\nNodes are created automatically when you do the connection, and removed if they do not have any more connections. So do not worry about them.\n\n\nAsk the Network\n---------------\n\nNow you can query all kinds of relations, not only the once you taught. With select you specify a starting point, like\n``customer.id`` and specify the category where you like to know its closes relation.\n\n* ``select`` - gives you the best related nodes from a specified category\n\nThe searching query takes into account all the different routes up to a radius you specify.\n\nExample\n-------\n\n\nLets imagine we already have a table *customer*\n\n\n.. list-table::\n :header-rows: 1\n\n * - Id\n - Name\n - ..\n * - 101\n - jose\n - ...\n * - 102\n - maria\n - ...\n * - 103\n - juan\n - ...\n\nand you want to teach the network about recent purchases.\n\n.. code-block:: python\n\n from MyNQL import MyNQL\n mynql = MyNQL('store')\n\n mynql.connect('customer.juan', 'product.jeans')\n mynql.connect('customer.juan', 'product.socks')\n mynql.connect('customer.maria', 'product.socks')\n\nIf the column ``Name`` is unique you can use it as a key, otherwise you would need column ``Id``\\ , and your code would look like this:\n\n.. code-block:: python\n\n mynql.connect(\"customer.103', 'product.12')\n\nNow you can ask questions from other points of view. You always specify a starting point, and the category where you want to know the best matches:\n\n.. code-block:: python\n\n >>> mynql.select('customer.maria', 'product')\n ['socks', 'jeans']\n\nMaria is more connected to ``socks``, as she has a direct connection, but also a bit to ``jeans`` as there exist an indirect connection through Juan.\n\n.. code-block:: python\n\n >>> mynql.select('product.jeans', 'product')\n ['socks']\n\nAny combination is valid. For example you can ask about how one product is related to other. \n\n\nBackend\n-------\n\nStorage is done in memory, but if you want to use MySQL, SQLite or PostgreSQL as a backend take a look at ``test/pee_example.py``.\nThis will keep a copy of all updates in your database.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://mynql.readthedocs.io/en/latest/", "keywords": "recommendation query language", "license": "", "maintainer": "", "maintainer_email": "", "name": "MyNQL", "package_url": "https://pypi.org/project/MyNQL/", "platform": "", "project_url": "https://pypi.org/project/MyNQL/", "project_urls": { "Homepage": "http://mynql.readthedocs.io/en/latest/" }, "release_url": "https://pypi.org/project/MyNQL/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "My Network Query Language", "version": "0.2.1" }, "last_serial": 3932915, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7cddf63fc590512fad32061842331d00", "sha256": "a9c817c9c9b961f8bda0292939269e77e889a9bd41a7f2dee627b84ff1b850ae" }, "downloads": -1, "filename": "MyNQL-0.1.tar.gz", "has_sig": false, "md5_digest": "7cddf63fc590512fad32061842331d00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6389, "upload_time": "2018-06-02T09:01:47", "url": "https://files.pythonhosted.org/packages/85/05/9dcb10292a3dec555758160add2386e28467efbf2c08916be4da9dd02f72/MyNQL-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a184329cef1ae48db57488cb38df15c1", "sha256": "1a51d2f8b77a8eb05e5bc66452341d3c32ba0fde0e46e1c8f8a11b8d95a75470" }, "downloads": -1, "filename": "MyNQL-0.2.tar.gz", "has_sig": false, "md5_digest": "a184329cef1ae48db57488cb38df15c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6665, "upload_time": "2018-06-02T09:42:32", "url": "https://files.pythonhosted.org/packages/ce/5b/bdf45a294e0acecae642e025c029b03a30ab5738418e7fc9b4383492cde4/MyNQL-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "8c81b7eb2745ce36f4811d0aa764f9ad", "sha256": "fcd40e61d0c302ed238985a705c0d1df7ea17d6c001eb21b35936342ce98be2d" }, "downloads": -1, "filename": "MyNQL-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8c81b7eb2745ce36f4811d0aa764f9ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7872, "upload_time": "2018-06-05T16:40:13", "url": "https://files.pythonhosted.org/packages/3c/96/5e45ac8e2b29613d5a8e416a20d4788301a15141de93e6da2ba98a6aa331/MyNQL-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8c81b7eb2745ce36f4811d0aa764f9ad", "sha256": "fcd40e61d0c302ed238985a705c0d1df7ea17d6c001eb21b35936342ce98be2d" }, "downloads": -1, "filename": "MyNQL-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8c81b7eb2745ce36f4811d0aa764f9ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7872, "upload_time": "2018-06-05T16:40:13", "url": "https://files.pythonhosted.org/packages/3c/96/5e45ac8e2b29613d5a8e416a20d4788301a15141de93e6da2ba98a6aa331/MyNQL-0.2.1.tar.gz" } ] }