{ "info": { "author": "Brett Alistair Kromkamp", "author_email": "brett.kromkamp@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "TypedTree by Brett Kromkamp\n===========================\n\n`Contextualise`_, a knowledge management application that I am currently developing, allows the user to visualise their\ntopics of interest (i.e., *nodes*) and the relationships between those topics (i.e, *references to other nodes*) using a\nnetwork graph visualisation. To that effect, ``TypedTree`` makes it straightforward to not only enable the visualisation\nof the actual (network) graph itself but also to enhance the visualisation with information related to the type of each\nnode and the references to other nodes, respectively.\n\nTypedTree is based on an earlier implementation of mine: `Python tree implementation`_.\n\nInstallation\n------------\n\n``TypedTree`` officially supports Python 3.6\u20133.7. To install ``TypedTree``, simply::\n\n $ pip install typed-tree\n\n\nInstall the Development Version\n-------------------------------\n\nIf you have `Git `_ installed on your system, it is possible to install the development version\nof ``TypedTree``.\n\nBefore installing the development version, you may need to uninstall the standard version of ``TypedTree`` using\n``pip``::\n\n $ pip uninstall typed-tree\n\nThen do::\n\n $ git clone https://github.com/brettkromkamp/typed-tree\n $ cd typed-tree\n $ pip install -e .\n\nThe ``pip install -e .`` command allows you to follow the development branch as it changes by creating links in the\nright places and installing the command line scripts to the appropriate locations.\n\nThen, if you want to update ``TypedTree`` at any time, in the same directory do::\n\n $ git pull\n\nExample\n-------\n\n.. code-block:: python\n\n from typedtree.traversalconstant import TraversalConstant\n from typedtree.tree import Tree\n\n tree = Tree()\n\n # A node without a parent pointer is by definition the root node\n tree.add_node('Elon Musk', node_type='person')\n\n tree.add_node('Lyndon Rive', parent_pointer='Elon Musk', node_type='person', edge_type='family')\n tree.add_node('SpaceX', parent_pointer='Elon Musk', node_type='company', edge_type='founder')\n tree.add_node('Tesla', parent_pointer='Elon Musk', node_type='company', edge_type='founder')\n tree.add_node('Solar City', parent_pointer='Lyndon Rive', node_type='company', edge_type='co-founder')\n tree.add_node('Solar Energy Services', parent_pointer='Solar City', node_type='product', edge_type='service')\n tree.add_node('Falcon 9', parent_pointer='SpaceX', node_type='rocket', edge_type='technology')\n tree.add_node('Falcon Heavy', parent_pointer='SpaceX', node_type='rocket', edge_type='technology')\n tree.add_node('Dragon', parent_pointer='SpaceX', node_type='space-ship', edge_type='technology')\n tree.add_node('Model S', parent_pointer='Tesla', node_type='car', edge_type='product')\n tree.add_node('Model X', parent_pointer='Tesla', node_type='car', edge_type='product')\n tree.add_node('Model Y', parent_pointer='Tesla', node_type='car', edge_type='product')\n tree.add_node('Roadster', parent_pointer='Tesla', node_type='car', edge_type='product')\n\n print('\\n***** TREE STRUCTURE *****')\n tree.display('Elon Musk')\n\n print('\\n***** DEPTH-FIRST ITERATION *****')\n for identifier in tree.traverse('Elon Musk'):\n node = tree[identifier]\n print(f\"{node.identifier} [{node.type or '*Undefined*'}]\")\n\n print('\\n***** BREADTH-FIRST ITERATION *****')\n for identifier in tree.traverse('Elon Musk', mode=TraversalConstant.BREADTH):\n node = tree[identifier]\n print(f\"{node.identifier} [{node.type or '*Undefined*'}]\")\n\n\n**Output**\n\n.. code-block:: text\n\n ***** TREE STRUCTURE *****\n Elon Musk [person] - (*Undefined*)\n Lyndon Rive [person] - (family)\n Solar City [company] - (co-founder)\n Solar Energy Services [product] - (service)\n SpaceX [company] - (founder)\n Falcon 9 [rocket] - (technology)\n Falcon Heavy [rocket] - (technology)\n Dragon [space-ship] - (technology)\n Tesla [company] - (founder)\n Model S [car] - (product)\n Model X [car] - (product)\n Model Y [car] - (product)\n Roadster [car] - (product)\n\n ***** DEPTH-FIRST ITERATION *****\n Elon Musk [person]\n Lyndon Rive [person]\n Solar City [company]\n Solar Energy Services [product]\n SpaceX [company]\n Falcon 9 [rocket]\n Falcon Heavy [rocket]\n Dragon [space-ship]\n Tesla [company]\n Model S [car]\n Model X [car]\n Model Y [car]\n Roadster [car]\n\n ***** BREADTH-FIRST ITERATION *****\n Elon Musk [person]\n Lyndon Rive [person]\n SpaceX [company]\n Tesla [company]\n Solar City [company]\n Falcon 9 [rocket]\n Falcon Heavy [rocket]\n Dragon [space-ship]\n Model S [car]\n Model X [car]\n Model Y [car]\n Roadster [car]\n Solar Energy Services [product]\n\nDocumentation\n-------------\n\nPending.\n\nHow to Contribute\n-----------------\n\n#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.\n#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).\n#. Write a test which shows that the bug was fixed or that the feature works as expected.\n#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.\n\n.. _Python tree implementation: http://www.quesucede.com/page/show/id/python-3-tree-implementation\n.. _Contextualise: https://trello.com/b/43ZVFVWE/contextualise-application\n.. _the repository: https://github.com/brettkromkamp/typed-tree\n.. _AUTHORS: https://github.com/brettkromkamp/typed-tree/blob/master/AUTHORS.rst\n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brettkromkamp/typed-tree", "keywords": "typed tree,data structure,hierarchy,tree,visualization", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "typed-tree", "package_url": "https://pypi.org/project/typed-tree/", "platform": "", "project_url": "https://pypi.org/project/typed-tree/", "project_urls": { "Homepage": "https://github.com/brettkromkamp/typed-tree" }, "release_url": "https://pypi.org/project/typed-tree/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "TypedTree provides a tree structure that allows adding type information to its nodes and relations, respectively.", "version": "1.0.3" }, "last_serial": 5764433, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "e782b0465004d76cba7da6e7d7d99a4f", "sha256": "2658742346e60b78a6e850ce84f0addb5e226635bcfd13128f98c5dc7f4cd60d" }, "downloads": -1, "filename": "typed_tree-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e782b0465004d76cba7da6e7d7d99a4f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6369, "upload_time": "2019-08-31T13:43:03", "url": "https://files.pythonhosted.org/packages/1e/c2/a2de583c4d3b97c5e4d3ced432abe4a38be9165a690891a1bf6fb06aff54/typed_tree-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f554f55adda74dd1e476b5e74e4bdc7", "sha256": "f26e752950ea0f7210175af6b7e69e6fc5ccd8387a25d702826399d9b843770f" }, "downloads": -1, "filename": "typed-tree-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5f554f55adda74dd1e476b5e74e4bdc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4791, "upload_time": "2019-08-31T13:43:06", "url": "https://files.pythonhosted.org/packages/01/89/1816604ca7459c40c2b847965e0c2043ad39157539ce3bc040835a8a4af3/typed-tree-1.0.1.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "b1762433369a98108c65eaa7d24a0b55", "sha256": "4c322552fe3500aafbba864ecccf96e0f2c433ec026a95860bb85938f4dd0da0" }, "downloads": -1, "filename": "typed_tree-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b1762433369a98108c65eaa7d24a0b55", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6679, "upload_time": "2019-08-31T14:16:23", "url": "https://files.pythonhosted.org/packages/12/15/5b406f42408bccd063c31465d111513f2ef25a992f58fdfcfb079ded12d7/typed_tree-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d57e16dda2e440846d65ff8abc6755e", "sha256": "e9f0e549ebd95d11cc4d4537c3301b00bc084d0772828ea6283dcad0fad24252" }, "downloads": -1, "filename": "typed-tree-1.0.3.tar.gz", "has_sig": false, "md5_digest": "4d57e16dda2e440846d65ff8abc6755e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4798, "upload_time": "2019-08-31T14:16:26", "url": "https://files.pythonhosted.org/packages/62/b5/763547520d9249250048ae18c7d42cd02839109e2756caa9fc7c9c971da6/typed-tree-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1762433369a98108c65eaa7d24a0b55", "sha256": "4c322552fe3500aafbba864ecccf96e0f2c433ec026a95860bb85938f4dd0da0" }, "downloads": -1, "filename": "typed_tree-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b1762433369a98108c65eaa7d24a0b55", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6679, "upload_time": "2019-08-31T14:16:23", "url": "https://files.pythonhosted.org/packages/12/15/5b406f42408bccd063c31465d111513f2ef25a992f58fdfcfb079ded12d7/typed_tree-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d57e16dda2e440846d65ff8abc6755e", "sha256": "e9f0e549ebd95d11cc4d4537c3301b00bc084d0772828ea6283dcad0fad24252" }, "downloads": -1, "filename": "typed-tree-1.0.3.tar.gz", "has_sig": false, "md5_digest": "4d57e16dda2e440846d65ff8abc6755e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4798, "upload_time": "2019-08-31T14:16:26", "url": "https://files.pythonhosted.org/packages/62/b5/763547520d9249250048ae18c7d42cd02839109e2756caa9fc7c9c971da6/typed-tree-1.0.3.tar.gz" } ] }