{ "info": { "author": "Thomas Minier", "author_email": "thomas.minier@univ-nantes.fr", "bugtrack_url": null, "classifiers": [], "description": "|Build Status| |Documentation Status| |PyPI version|\n\nRead and query HDT document with ease in Python\n\n`Online Documentation `__\n\nRequirements\n============\n\n- Python *version 3.6.4 or higher*\n- `pip `__\n- **gcc/clang** with **c++11 support**\n- **Python Development headers** > You should have the ``Python.h``\n header available on your system.\n > For example, for Python 3.6, install the ``python3.6-dev`` package\n on Debian/Ubuntu systems.\n\nThen, install the `pybind11\nlibrary `__\n\n::\n\n pip install pybind11\n\nInstallation\n============\n\nInstallation in a `virtualenv `__\nis **strongly advised!**\n\nPip install (recommended)\n-------------------------\n\n::\n\n pip install hdt\n\nManual installation\n-------------------\n\n::\n\n git clone https://github.com/Callidon/pyHDT\n cd pyHDT/\n ./install.sh\n\nGetting started\n===============\n\n.. code:: python\n\n from hdt import HDTDocument\n\n # Load an HDT file.\n # Missing indexes are generated automatically, add False as the second argument to disable them\n document = HDTDocument(\"test.hdt\")\n\n # Display some metadata about the HDT document itself\n print(\"nb triples: %i\" % document.total_triples)\n print(\"nb subjects: %i\" % document.nb_subjects)\n print(\"nb predicates: %i\" % document.nb_predicates)\n print(\"nb objects: %i\" % document.nb_objects)\n print(\"nb shared subject-object: %i\" % document.nb_shared)\n\n # Fetch all triples that matches { ?s ?p ?o }\n # Use empty strings (\"\") to indicates variables\n triples, cardinality = document.search_triples(\"\", \"\", \"\")\n\n print(\"cardinality of { ?s ?p ?o }: %i\" % cardinality)\n for triple in triples:\n print(triple)\n\n # Search also support limit and offset\n triples, cardinality = document.search_triples(\"\", \"\", \"\", limit=10, offset=100)\n # etc ...\n\n.. |Build Status| image:: https://travis-ci.org/Callidon/pyHDT.svg?branch=master\n :target: https://travis-ci.org/Callidon/pyHDT\n.. |Documentation Status| image:: https://readthedocs.org/projects/pyhdt/badge/?version=latest\n :target: https://callidon.github.io/pyHDT\n.. |PyPI version| image:: https://badge.fury.io/py/hdt.svg\n :target: https://badge.fury.io/py/hdt\n\nHandling non UTF-8 strings in python\n====================================\n\nIf the HDT document has been encoded with a non UTF-8 encoding the\nprevious code won\u2019t work correctly and will result in a\n``UnicodeDecodeError``. More details on how to convert string to str\nfrom c++ to python `here`_\n\nTo handle this we doubled the API of the HDT document by adding:\n\n- ``search_triples_bytes(...)`` return an iterator of triples as ``(py::bytes, py::bytes, py::bytes)``\n- ``search_join_bytes(...)`` return an iterator of sets of solutions mapping as ``py::set(py::bytes, py::bytes)``\n- ``convert_tripleid_bytes(...)`` return a triple as: ``(py::bytes, py::bytes, py::bytes)``\n- ``convert_id_bytes(...)`` return a ``py::bytes``\n\n**Parameters and documentation are the same as the standard version**\n\n.. code:: python\n\n from hdt import HDTDocument\n\n # Load an HDT file.\n # Missing indexes are generated automatically, add False as the second argument to disable them\n document = HDTDocument(\"test.hdt\")\n it = document.search_triple_bytes(\"\", \"\", \"\")\n\n for s, p, o in it:\n print(s, p, o) # print b'...', b'...', b'...'\n # now decode it, or handle any error\n try:\n s, p, o = s.decode('UTF-8'), p.decode('UTF-8'), o.decode('UTF-8')\n except UnicodeDecodeError as err:\n # try another other codecs\n pass\n\n.. _here: https://pybind11.readthedocs.io/en/stable/advanced/cast/strings.html", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Callidon/pyHDT", "keywords": "hdt,rdf,semantic web,search", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hdt", "package_url": "https://pypi.org/project/hdt/", "platform": "", "project_url": "https://pypi.org/project/hdt/", "project_urls": { "Homepage": "https://github.com/Callidon/pyHDT" }, "release_url": "https://pypi.org/project/hdt/2.3/", "requires_dist": null, "requires_python": "", "summary": "Read and query HDT document with ease in Python", "version": "2.3", "yanked": false, "yanked_reason": null }, "last_serial": 6023292, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "758c9be4b576de151165853b31768934", "sha256": "398f4de4a8376d4039b8d1514f47a8e881f0da17c9302783cd7e7da94ae30fe6" }, "downloads": -1, "filename": "hdt-1.0.0.tar.gz", "has_sig": false, "md5_digest": "758c9be4b576de151165853b31768934", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 100119, "upload_time": "2018-02-13T11:33:52", "upload_time_iso_8601": "2018-02-13T11:33:52.917911Z", "url": "https://files.pythonhosted.org/packages/c0/b3/b102df3b0bb2fe34f9910826242b5c049c4e57645021f58522c20d7638fc/hdt-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b1e715f5ea8a8c340d98ea89c21ab656", "sha256": "cfd4d244f8fd6b011453ff59cad8727c034316aec5ba1bbc513c8ebbeebf1291" }, "downloads": -1, "filename": "hdt-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b1e715f5ea8a8c340d98ea89c21ab656", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 130063, "upload_time": "2018-03-01T09:11:34", "upload_time_iso_8601": "2018-03-01T09:11:34.211627Z", "url": "https://files.pythonhosted.org/packages/23/84/334b4f260e4bd61f1ff5a56e38bfe712b2f2538654ebb866b4c5590520b4/hdt-1.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "763c64715cac32037d172a255efc4fbc", "sha256": "a55f8e0af33f43e17b128592e8b729e47e2d8ac91bac0c5e015773072f39aedc" }, "downloads": -1, "filename": "hdt-1.0.3.tar.gz", "has_sig": false, "md5_digest": "763c64715cac32037d172a255efc4fbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 178675, "upload_time": "2018-03-01T09:37:27", "upload_time_iso_8601": "2018-03-01T09:37:27.679810Z", "url": "https://files.pythonhosted.org/packages/8e/1d/8be3017ca396a2a535383b376f5b029167bd97849bb0bf6dca4ac08b4bae/hdt-1.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "bc01db42fadd7f1b6505a107ada5f67b", "sha256": "d0f5e6b16b7e177f003619e0db3dadd4ff268aa0c38fed3c890f755b9dffb3e8" }, "downloads": -1, "filename": "hdt-1.0.4-py2.7-linux-x86_64.egg", "has_sig": false, "md5_digest": "bc01db42fadd7f1b6505a107ada5f67b", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4122815, "upload_time": "2018-03-02T10:52:03", "upload_time_iso_8601": "2018-03-02T10:52:03.634314Z", "url": "https://files.pythonhosted.org/packages/69/e3/c8da67721218f08a3db0df0d390064873cb7f4090b3f568be005e005341b/hdt-1.0.4-py2.7-linux-x86_64.egg", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b7037b413cd09792e36af3c486fa05a6", "sha256": "9c497f7bfd2fd39b96a86cae99eb251e15e6df440e341f782a354f5c17a7d43c" }, "downloads": -1, "filename": "hdt-1.0.4-py3.6-linux-x86_64.egg", "has_sig": false, "md5_digest": "b7037b413cd09792e36af3c486fa05a6", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 4118704, "upload_time": "2018-03-02T11:05:18", "upload_time_iso_8601": "2018-03-02T11:05:18.043038Z", "url": "https://files.pythonhosted.org/packages/1d/49/fc38f4b17361e60394974cd8c58d30eb866bfce974c94b9a6ab17192fdfe/hdt-1.0.4-py3.6-linux-x86_64.egg", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "bd0f042dfb6c71a6060016db5f685ce4", "sha256": "46adab43b70a4a97e464cfc73d941560064c22cf88a1021137ea449f4336ae71" }, "downloads": -1, "filename": "hdt-1.0.4.tar.gz", "has_sig": false, "md5_digest": "bd0f042dfb6c71a6060016db5f685ce4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 179483, "upload_time": "2018-03-02T10:52:05", "upload_time_iso_8601": "2018-03-02T10:52:05.818665Z", "url": "https://files.pythonhosted.org/packages/3c/78/483de9651079ae9737621db6c901dd6b11615f876b333eb5605978b2d514/hdt-1.0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.4rc0": [ { "comment_text": "", "digests": { "md5": "87d6c2a0f3c74e1d563948f201405ced", "sha256": "b8bf0750fe5952cddde0931c13afca229180a2d447912090f0415966e6083fb1" }, "downloads": -1, "filename": "hdt-1.0.4rc0-py3.6-linux-x86_64.egg", "has_sig": false, "md5_digest": "87d6c2a0f3c74e1d563948f201405ced", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 4118645, "upload_time": "2018-03-02T12:26:43", "upload_time_iso_8601": "2018-03-02T12:26:43.698839Z", "url": "https://files.pythonhosted.org/packages/9b/df/8787b314bcd7030eb86d9f8350c0361945e301dcbd8dcd8e68ba37245c4e/hdt-1.0.4rc0-py3.6-linux-x86_64.egg", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "69edcdabab7b5bce3f03d99747c8ea2d", "sha256": "efe0df7aed09be08f216af415612f486506374df74739dfedc160ec9a51322d1" }, "downloads": -1, "filename": "hdt-1.0.4rc0.tar.gz", "has_sig": false, "md5_digest": "69edcdabab7b5bce3f03d99747c8ea2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 179348, "upload_time": "2018-03-02T12:26:50", "upload_time_iso_8601": "2018-03-02T12:26:50.089884Z", "url": "https://files.pythonhosted.org/packages/cd/be/e99111e3da802701a1caf09b8158e8c53adb806bb4adb0a6f9cdfaefe631/hdt-1.0.4rc0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "063f8a47184f48e61a91bb1a7daf6d0d", "sha256": "956aadf56f783d564518ca0ccc148b344f0439a8cdde3ab4c6e4b3866ebbfa23" }, "downloads": -1, "filename": "hdt-1.1.0-py3.6-linux-x86_64.egg", "has_sig": false, "md5_digest": "063f8a47184f48e61a91bb1a7daf6d0d", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 4118895, "upload_time": "2018-03-03T10:36:56", "upload_time_iso_8601": "2018-03-03T10:36:56.009386Z", "url": "https://files.pythonhosted.org/packages/cd/3f/c053c893975ebcd20a3321f112dadbf60fa6965c1e592f4313813d5da04a/hdt-1.1.0-py3.6-linux-x86_64.egg", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "654493645c81144135dff382246820b1", "sha256": "8c8625162f0bd6c4ae51341f6ae18441c0df87a2b2111763aaa863202bb1bacc" }, "downloads": -1, "filename": "hdt-1.1.0.tar.gz", "has_sig": false, "md5_digest": "654493645c81144135dff382246820b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 213972, "upload_time": "2018-03-03T10:36:58", "upload_time_iso_8601": "2018-03-03T10:36:58.718143Z", "url": "https://files.pythonhosted.org/packages/b7/a8/a2283be5b814d3c6d034218bc234e6f25e6317c99cce825562c1e7cc5ec2/hdt-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "2.0": [ { "comment_text": "", "digests": { "md5": "ea7fd21bc102654e92f1104b047667fe", "sha256": "793a1806488fc615c01e9d605db5344667477802de4e926b1175564921344a01" }, "downloads": -1, "filename": "hdt-2.0-cp36-cp36m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "ea7fd21bc102654e92f1104b047667fe", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 504952, "upload_time": "2019-02-14T16:02:33", "upload_time_iso_8601": "2019-02-14T16:02:33.947529Z", "url": "https://files.pythonhosted.org/packages/a3/be/6bde5d8332139d9f86f32bd0abe373246635ef555db020c79e3e9ae57d73/hdt-2.0-cp36-cp36m-macosx_10_12_x86_64.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "adcc7d587590a4574fffe9b6b8a0adfe", "sha256": "6b9a6fd263d3d20eff99307c9faf3745960b230e570fd6f049792ba8e2702268" }, "downloads": -1, "filename": "hdt-2.0.tar.gz", "has_sig": false, "md5_digest": "adcc7d587590a4574fffe9b6b8a0adfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234541, "upload_time": "2019-02-14T15:58:48", "upload_time_iso_8601": "2019-02-14T15:58:48.183890Z", "url": "https://files.pythonhosted.org/packages/31/f1/26d365f34e535f4602171d272d0daaad20f54ea93377dd8348e9373748d6/hdt-2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "2.1": [ { "comment_text": "", "digests": { "md5": "412e5c4c96e10ae0858d6691d43a6d1c", "sha256": "b42c0d9b5ae67504b9e8295bd25d63d2553eb7194ee9a4463deaff82a0835d10" }, "downloads": -1, "filename": "hdt-2.1.tar.gz", "has_sig": false, "md5_digest": "412e5c4c96e10ae0858d6691d43a6d1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 230898, "upload_time": "2019-05-02T12:32:24", "upload_time_iso_8601": "2019-05-02T12:32:24.496026Z", "url": "https://files.pythonhosted.org/packages/d7/d5/c2488ee1a7eca108ec4486d3d6eeeb83876dbee3544a42e597903ba62306/hdt-2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "2.2": [ { "comment_text": "", "digests": { "md5": "53b2a052acb2e113a8e57e52479aa613", "sha256": "7e75814632e5f4d48bbda939f5d1a4bea650373963fe0f5879079c9e5981630a" }, "downloads": -1, "filename": "hdt-2.2.tar.gz", "has_sig": false, "md5_digest": "53b2a052acb2e113a8e57e52479aa613", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 231068, "upload_time": "2019-05-04T09:54:09", "upload_time_iso_8601": "2019-05-04T09:54:09.375510Z", "url": "https://files.pythonhosted.org/packages/6a/ad/8410e4ab0b66892d6ac19919fb7a0bdc155c41b0941c5868d944013c8769/hdt-2.2.tar.gz", "yanked": false, "yanked_reason": null } ], "2.2.1": [ { "comment_text": "", "digests": { "md5": "8c7268c30b78dd7311ed5aa728d99a3f", "sha256": "f86a1c5dbae9f66f9dd5b419e84027f72ddb887d56028ccc9baf07a056182f20" }, "downloads": -1, "filename": "hdt-2.2.1.tar.gz", "has_sig": false, "md5_digest": "8c7268c30b78dd7311ed5aa728d99a3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 226870, "upload_time": "2019-05-06T09:11:20", "upload_time_iso_8601": "2019-05-06T09:11:20.492297Z", "url": "https://files.pythonhosted.org/packages/ca/ed/44af127d58978074c8b47ac64584e4aae6f954d899b6374b0d2bfd27c726/hdt-2.2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "2.3": [ { "comment_text": "", "digests": { "md5": "e4ebb2bc4c2290617248d2eb5c820cef", "sha256": "103eac995122a9109408bfcfa5d7508d09a25ab7cf954c541b48a27ebb01c2f9" }, "downloads": -1, "filename": "hdt-2.3.tar.gz", "has_sig": false, "md5_digest": "e4ebb2bc4c2290617248d2eb5c820cef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 229517, "upload_time": "2019-10-24T11:42:07", "upload_time_iso_8601": "2019-10-24T11:42:07.001080Z", "url": "https://files.pythonhosted.org/packages/51/82/41f1e4a131881da64a1ab2c4675dd93020a1a7109be08a2eb790cb6b92c6/hdt-2.3.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e4ebb2bc4c2290617248d2eb5c820cef", "sha256": "103eac995122a9109408bfcfa5d7508d09a25ab7cf954c541b48a27ebb01c2f9" }, "downloads": -1, "filename": "hdt-2.3.tar.gz", "has_sig": false, "md5_digest": "e4ebb2bc4c2290617248d2eb5c820cef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 229517, "upload_time": "2019-10-24T11:42:07", "upload_time_iso_8601": "2019-10-24T11:42:07.001080Z", "url": "https://files.pythonhosted.org/packages/51/82/41f1e4a131881da64a1ab2c4675dd93020a1a7109be08a2eb790cb6b92c6/hdt-2.3.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }