{
"info": {
"author": "Opus One Solutions",
"author_email": "rnd@opusonesolutions.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "asciigraf\n=========\n\n.. image:: https://travis-ci.org/opusonesolutions/asciigraf.svg?branch=master\n :target: https://travis-ci.org/opusonesolutions/asciigraf\n\n.. image:: https://coveralls.io/repos/github/opusonesolutions/asciigraf/badge.svg?branch=master\n :target: https://coveralls.io/github/opusonesolutions/asciigraf?branch=master\n\n.. image:: https://img.shields.io/badge/License-MIT-yellow.svg\n :target: https://opensource.org/licenses/MIT\n\n.. image:: https://badge.fury.io/py/asciigraf.svg\n :target: https://pypi.python.org/pypi/asciigraf\n\n.. image:: https://img.shields.io/pypi/pyversions/asciigraf.svg\n :target: https://pypi.python.org/pypi/asciigraf\n\n.. image:: https://api.codeclimate.com/v1/badges/e7e872f6832da6cf6ab6/maintainability\n :target: https://codeclimate.com/github/opusonesolutions/asciigraf/maintainability\n :alt: Maintainability\n\nAsciigraf is a python library that turns ascii diagrams of networks into\nnetwork objects. It returns a `networkx `__\ngraph of nodes for each alpha-numeric element in the input text; nodes\nare connected in the graph to match the edges represented in the diagram\nby ``-``, ``/``, ``\\`` and ``|``.\n\nInstallation\n------------\n\nAsciigraf can be installed from pypi using pip:\n\n.. code::\n\n ~/$ pip install asciigraf\n\nUsage\n-----\n\nAsciigraf expects a string containg a 2-d ascii diagram. Nodes can be an\nalphanumeric string composed of characters in ``A-Z``, ``a-z``, ``0-9``,\nand ``_, {, }``. Edges can be composed of ``-``, ``/``, ``\\`` and ``|``.\n\n.. code:: python\n\n\n import asciigraf\n\n network = asciigraf.graph_from_ascii(\"\"\"\n NodeA-----\n |\n |---NodeB\n \"\"\")\n\n print(network)\n >>> \n\n print(network.edges())\n >>> [('NodeA', 'NodeB')]\n\n print(network.nodes())\n >>> ['NodeA', 'NodeB']\n\n\nNetworkx provides tools to attach data to nodes and edges, and asciigraf\nleverages these in a number of ways; in the example below you can see that\nasciigraf uses this to attach a ``x, y`` position tuple to each node\nindicating where on the *(x, y)* plane each node\nstarts ( *0,0* is at the top-left). It also attaches a ``length`` attribute\nto each edge which matches the number of characters in that edge, as well\nas a list of positions for each character an edge\n\n.. code:: python\n\n print(network.nodes(data=True))\n >>> [('NodeA', {'position': (10, 1)}), ('NodeB', {'position': (23, 3)})]\n\n print(network.edges(data=True))\n >>> [('NodeA', 'NodeB', OrderedDict([('length', 10), 'points', [...]))]\n \n print(network.edge['NodeA']['NodeB']['points'])\n >>> [(15, 1), (16, 1), (17, 1), (18, 1),\n (19, 1), (19, 2), (19, 3), (20, 3), (21, 3), (22, 3)]\n\n\nAsciigraf also lets you annotate the edges of graphs using in-line labels ---\ndenoted by parentheses. The contents of the label will be attached to the edge\non which it is drawn with the attribute name ``label``.\n\n.. code:: python\n\n network = asciigraf.graph_from_ascii(\"\"\"\n\n A---(nuts)----B----(string)---C\n |\n |\n |\n D---(string)----E\n\n \"\"\")\n\n print(network.get_edge_data(\"A\", \"B\")[\"label\"])\n >>> nuts\n\n print(network.get_edge_data(\"B\", \"C\")[\"label\"])\n >>> string\n\n print(network.get_edge_data(\"D\", \"E\")[\"label\"])\n >>> string\n\n print(hasattr(network.get_edge_data(\"B\", \"D\"), \"label\"))\n >>> False\n\n\nHave fun!\n\n.. code:: python\n\n import asciigraf\n\n\n network = asciigraf.graph_from_ascii(\"\"\"\n s---p----1---nx\n / | |\n / | 0---f\n 6l-a c--\n / | \\--k\n / ua | 9e\n q \\ | /\n \\-r7z jud\n \\ |\n m y\n \\ |\n v-ow\n \"\"\")",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/opusonesolutions/asciigraf",
"keywords": "graph,network,testing,parser",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "asciigraf",
"package_url": "https://pypi.org/project/asciigraf/",
"platform": "",
"project_url": "https://pypi.org/project/asciigraf/",
"project_urls": {
"Homepage": "https://github.com/opusonesolutions/asciigraf"
},
"release_url": "https://pypi.org/project/asciigraf/0.8.0/",
"requires_dist": null,
"requires_python": "",
"summary": "A python library for making ascii-art into network graphs.",
"version": "0.8.0"
},
"last_serial": 4454369,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "816b2355d6c25228ecc0b8e31043345f",
"sha256": "bdb1d1a5ae16a2eceed88fe556ccd0d623daf761f6a9414a7654349c279bc759"
},
"downloads": -1,
"filename": "asciigraf-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "816b2355d6c25228ecc0b8e31043345f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4426,
"upload_time": "2018-08-22T13:43:18",
"url": "https://files.pythonhosted.org/packages/40/91/217a7c8e85260f680d41466139b65b7305099a6033b02d0cc99609839ddc/asciigraf-0.0.1.tar.gz"
}
],
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "67d6045dbea1a54a07ab32449a9c968e",
"sha256": "fff2b4cdb836c4be3e6b22bcb52093625c665bbf43abe19c3adcb23767ca1f32"
},
"downloads": -1,
"filename": "asciigraf-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "67d6045dbea1a54a07ab32449a9c968e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2839,
"upload_time": "2017-10-18T14:54:48",
"url": "https://files.pythonhosted.org/packages/a3/73/070150893fefc4c8f829bf4dd1694452fc4753c3d607cd3a28556fb1cd3b/asciigraf-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "49c87c1b8ab6183e6f907f6fe6926bdd",
"sha256": "0618c040d58db5ff943cd14792b9bf1d460d3f6dcccfee6fd72dcb001a51d194"
},
"downloads": -1,
"filename": "asciigraf-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "49c87c1b8ab6183e6f907f6fe6926bdd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3184,
"upload_time": "2017-10-18T17:34:16",
"url": "https://files.pythonhosted.org/packages/21/6f/d3116b27f04514bb98b1eabf90f6f75cf88e7a3634f8ce7f62f0a7eecdc3/asciigraf-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "1d7c92841920f5d776946d07660af34a",
"sha256": "e09490fa093ff74dc6c5b3a29599b4a565b3c65a87cf6a4161c82ccbb249303f"
},
"downloads": -1,
"filename": "asciigraf-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1d7c92841920f5d776946d07660af34a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3454,
"upload_time": "2017-10-18T18:00:03",
"url": "https://files.pythonhosted.org/packages/17/8d/2dd599b8074e4537b2d1ef0605c305549d53cc1028bb1ee0995fd35a0358/asciigraf-0.1.2.tar.gz"
}
],
"0.1.3": [
{
"comment_text": "",
"digests": {
"md5": "d1918638d92bc23be1d795728d8f2fd3",
"sha256": "6cf7e4a60ff8c7987e1591b4e708c20da8abc620bff667d5b596a06992babe94"
},
"downloads": -1,
"filename": "asciigraf-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "d1918638d92bc23be1d795728d8f2fd3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3429,
"upload_time": "2017-10-18T20:11:31",
"url": "https://files.pythonhosted.org/packages/26/df/0056e93289919919acb4b305deb2bfbc03afc75398e2c77b317f4d1732d6/asciigraf-0.1.3.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "8b19fef276c057e4901c4efe68038f50",
"sha256": "45a7cb090f1a773fad97b7413f8d215dce201f137f485ec7a5b8ecbb06c0ce59"
},
"downloads": -1,
"filename": "asciigraf-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "8b19fef276c057e4901c4efe68038f50",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3538,
"upload_time": "2017-10-27T15:56:45",
"url": "https://files.pythonhosted.org/packages/c3/77/a6c78ab4d06a4f4819b2ca4926b9608c7ac279d1b8ac41deced6af7ece31/asciigraf-0.2.0.tar.gz"
}
],
"0.3.0": [
{
"comment_text": "",
"digests": {
"md5": "b072dfb9a4a624850b5b0b56c31ae4ce",
"sha256": "6858814fdca4c0178a3042bfde092172b6f54b4240b7fda562bf2f218130c4ad"
},
"downloads": -1,
"filename": "asciigraf-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "b072dfb9a4a624850b5b0b56c31ae4ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4205,
"upload_time": "2017-10-30T14:29:38",
"url": "https://files.pythonhosted.org/packages/9a/5f/92d8b13e3730d65da5e4a730c4537eb85eac716281f1453c999eb061769f/asciigraf-0.3.0.tar.gz"
}
],
"0.5.0": [
{
"comment_text": "",
"digests": {
"md5": "2240e1fe4479a04fe42b6d00babd9571",
"sha256": "a228fd4ca493b79e8357d2ab40d4c0e54f5c7b09d520af30128f6b662df54b46"
},
"downloads": -1,
"filename": "asciigraf-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "2240e1fe4479a04fe42b6d00babd9571",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4421,
"upload_time": "2018-08-22T18:04:52",
"url": "https://files.pythonhosted.org/packages/09/55/79d32e30c0b943faa3c14c7f54801bdb6dbf5b2c590a65902d72924d9805/asciigraf-0.5.0.tar.gz"
}
],
"0.6.0": [
{
"comment_text": "",
"digests": {
"md5": "11d9ef4da5ec437da58feba0cce54e11",
"sha256": "5d8f943491d8e030cf675b6a9f4b4e1517ee39022a6d402868e3a6810f3fedfb"
},
"downloads": -1,
"filename": "asciigraf-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "11d9ef4da5ec437da58feba0cce54e11",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4987,
"upload_time": "2018-10-12T17:11:11",
"url": "https://files.pythonhosted.org/packages/64/c7/1a4c59e2030eaec02ea34f19112c8694156779656a1accc211f911b3dc40/asciigraf-0.6.0.tar.gz"
}
],
"0.6.1": [
{
"comment_text": "",
"digests": {
"md5": "3e83143ccf1b96eaaebd7f9cd173182e",
"sha256": "f71856f76cba6485bc6fb573c94bd7e8f7276ddaa2ff44eb65468d9f45d3872c"
},
"downloads": -1,
"filename": "asciigraf-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "3e83143ccf1b96eaaebd7f9cd173182e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4987,
"upload_time": "2018-10-20T20:45:26",
"url": "https://files.pythonhosted.org/packages/7e/1b/175a1f8aabfc7da343bb627c45cb8e23e7ffe6c47519705ce904a8c69586/asciigraf-0.6.1.tar.gz"
}
],
"0.7.0": [
{
"comment_text": "",
"digests": {
"md5": "fa6b94a80ba88e8c407e8772d8a125a6",
"sha256": "419fd3f7b4410d30bb6226681ebbb01e96f7956dc3a2f53f54b4ff1fa5e0b607"
},
"downloads": -1,
"filename": "asciigraf-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "fa6b94a80ba88e8c407e8772d8a125a6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7192,
"upload_time": "2018-10-26T16:31:48",
"url": "https://files.pythonhosted.org/packages/a8/ba/c114d3468321667071143fab496e298e854499c9ce0d587e32a04301b69d/asciigraf-0.7.0.tar.gz"
}
],
"0.8.0": [
{
"comment_text": "",
"digests": {
"md5": "af152a67361013f2232fce582603f135",
"sha256": "35c027b933a223914ac472796563b3b46a517a3e8d663eb458ec6913b701f480"
},
"downloads": -1,
"filename": "asciigraf-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "af152a67361013f2232fce582603f135",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7378,
"upload_time": "2018-11-05T19:46:04",
"url": "https://files.pythonhosted.org/packages/25/e9/c7a955f1e58027bcf5d79af579b22d3dd053500860a12432a42973e60835/asciigraf-0.8.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "af152a67361013f2232fce582603f135",
"sha256": "35c027b933a223914ac472796563b3b46a517a3e8d663eb458ec6913b701f480"
},
"downloads": -1,
"filename": "asciigraf-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "af152a67361013f2232fce582603f135",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7378,
"upload_time": "2018-11-05T19:46:04",
"url": "https://files.pythonhosted.org/packages/25/e9/c7a955f1e58027bcf5d79af579b22d3dd053500860a12432a42973e60835/asciigraf-0.8.0.tar.gz"
}
]
}