{"id":16870371,"url":"https://github.com/maxython/towfm","last_synced_at":"2025-03-18T19:45:40.358Z","repository":{"id":57476723,"uuid":"322095863","full_name":"Maxython/TOWFM","owner":"Maxython","description":"Create a data structure of any kind of tree.","archived":false,"fork":false,"pushed_at":"2021-02-22T15:14:49.000Z","size":647,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-14T15:03:59.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maxython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-16T20:36:11.000Z","updated_at":"2022-08-24T20:00:40.000Z","dependencies_parsed_at":"2022-09-14T12:30:36.272Z","dependency_job_id":null,"html_url":"https://github.com/Maxython/TOWFM","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxython%2FTOWFM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxython%2FTOWFM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxython%2FTOWFM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxython%2FTOWFM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maxython","download_url":"https://codeload.github.com/Maxython/TOWFM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244293238,"owners_count":20429806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T15:04:05.421Z","updated_at":"2025-03-18T19:45:40.338Z","avatar_url":"https://github.com/Maxython.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/Maxython/TOWFM/main/IMG_GIF/4995c55f-8b54-438f-bdc2-5bc179fc0e4a.png)\n\n# TOWFM\n\n## What is TOWFM?\nTOWFM is a flexible and convenient Python module for creating various tree data structures.\n\n## Installing TOWFM\nThe module supports the latest python version (3.9).\n#### Command:\n```\npip3 install TOWFM\n```\n  \n## Test run\nAfter installing the module, you can start generating the Binary Tree.\n#### Command:\n```Python\nfrom towfm.BTT import run\n\nrun()\n```\nThe result will be saved in the test_tree.js file.\n\n## Create WikiTree\n```Python\nfrom towfm.WT import CreateWT\n\na = CreateWT('hello world')\na.handle()\n```\n\n## Create binary search tree\n```Python\nfrom towfm import BinaryTree\n\na = BinaryTree(5, [2, 6, 3]) #1 way\n\na = BinaryTree(5) #2 way\na.append([2, 6, 3])\n\na = BinaryTree() #3 way\na.append(5)\na.append(2)\na.append(6)\na.append(3)\n\na.processed_tree #Returns a tree without extra nodes\n```\n\n## Create your own tree\n```Python\nfrom towfm import CreateTree\n\na = CreateTree('a', list(range(10))) #1 way\n\na = CreateTree('a') #2 way\na.add(0, list(range(10)))\n\na = CreateTree() #3 way\na.add_root_node('a', list(range(10)))\n\na = CreateTree() #4 way\na.add_root_node('a')\na.add(0, list(range(10)))\n\na = CreateTree('a') #5 way\nfor i in range(10):\n    a.add(0, i)\n```\n\n## Tree output\n\n### First way:\nOutputs the tree dictionary (main).\n```Python\na = CreateTree('a', list(range(10)))\nprint(a.tree)\n```\n\n### Second way:\nOutput of the CreateTree class.\n```Python\na = CreateTree('a', list(range(10)))\nprint(a)\n```\nThis method displays only part of the tree and additional information.\n\n### Third way:\nPrints the tree in an understandable format.\n```Python\na = CreateTree('a', list(range(10)))\na.pt()\n```\n\n## [Telegram Bot Test](https://github.com/Maxython/TOWFM/tree/main/bot)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxython%2Ftowfm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxython%2Ftowfm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxython%2Ftowfm/lists"}