{ "info": { "author": "Christopher H. Todd", "author_email": "Christopher.Hayden.Todd@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "# Christopher H. Todd's Python Library For Interacting With and Creating Python Datastructures\n\nThe ctodd-python-lib-data-structures project is responsible for aiding interacting with Pythons base datastructures, creating higher level data structures for projects and code, and other misc tasks. Example would be flattening out a python dict.\n\nThe library utilizes Python's built in datastrctures and some libraries (like Anytree) to generate new data sctructures. this can be useful for repetitive tasks or aiding with testing code and algorithms.\n\n## Table of Contents\n\n- [Dependencies](#dependencies)\n- [Libraries](#libraries)\n- [Example Scripts](#example-scripts)\n- [Notes](#notes)\n- [TODO](#todo)\n\n## Dependencies\n\n### Python Packages\n\n- anytree>=2.6.0\n\n## Libraries\n\n### (dict_helpers.py)[https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures/blob/master/data_structure_helpers/dict_helpers.py]\n\nProvide Dictionary Helper Functions\n\nFunctions:\n\n```\ndef flatten_dict_keys(dict_to_convert, parent=\"\", separator=\"/\", only_leaves=False):\n \"\"\"\n Purpose:\n Flatten out a dictionaryies keys as a list of strings so that functions\n can consume the list in a certain fashion\n\n a dict with paths to create on an OS as shown in\n os_helpers.directory_helpers.create_directories()\n Args:\n dict_to_convert (Dictionary): Dictionary with key/values. Will traverse the\n dict and convert all keys into a single list of strings\n separator (String): String separator of the keys\n only_leaves (Boolean): Whether or not to return non-leaf keys\n Return:\n dict_keys (List of Strings): The list of all keys and paths to each key\n in the provided dict\n \"\"\"\n```\n\n\n### (linked_list.py)[https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures/blob/master/data_structure_helpers/linked_list.py]\n\nLinked List Class for Link List DataTypes in Python\n\nExamples of Create Object of Class:\n```\n linked_list_object = LinkedList()\n```\n\nClasses:\n\n```\nclass LinkedList(object):\n \"\"\"\n LinkedList Class\n \"\"\"\n```\n\n### (linked_list_node.py)[https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures/blob/master/data_structure_helpers/linked_list_node.py]\n\nNodes Supporting the Linked List DataTypes in Python\n\nExamples of Create Object of Class:\n```\nlinked_list_node_object = LinkedListNode()\n```\n\nClasses:\n\n```\nclass LinkedListNode(object):\n \"\"\"\n LinkedListNode Class\n \"\"\"\n```\n\n### (list_helpers.py)[https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures/blob/master/data_structure_helpers/list_helpers.py]\n\nProvide List Helper Functions\n\nFunctions:\n\n```\ndef merge_two_sorted_lists(list_1, list_2):\n \"\"\"\n Purpose:\n Merge two sorted lists into one sorted list\n Args:\n list_1 (List): Sorted List to Merge\n list_2 (List): Sorted List to Merge\n Returns:\n sorted_list (List): Merged Sorted List\n \"\"\"\n```\n\n```\ndef generate_unique_randomized_list(list_size=None):\n \"\"\"\n Purpose:\n Generate a Randomized List with Unique Values\n of a sepcified size\n Args:\n list_size (Int): Size of list to generate. Lists\n default to 50 ints\n Returns:\n randomized_list (List): Unsorted and randomized\n list\n \"\"\"\n```\n\n```\ndef remove_duplicates(original_list):\n \"\"\"\n Purpose:\n Remove Duplicates in a List in Python (convert to set and\n back to a list)\n Args:\n original_list (Int): List with duplicates\n Returns:\n unique_list (List): List with duplicates removed\n \"\"\"\n```\n\n```\ndef perform_list_swap(unsorted_list, index_1, index_2):\n \"\"\"\n Purpose:\n Swap values in a list by reference. Utilizes\n a temp varilable and swaps any two values\n based on passed in indexes\n Args:\n unsorted_list (List): List to perform swap on\n index_1 (List Index, as Int): index position to swap\n index_2 (List Index, as Int): index position to swap\n Returns:\n unsorted_list (List): List with indexes swapped\n \"\"\"\n```\n\n```\ndef get_list_intersection(list_1, list_2):\n \"\"\"\n Purpose:\n Check for intersecting objects in two lists\n Args:\n list_1 (List of Objects): List with Objects\n list_2 (List of Objects): List with Objects\n Returns:\n intesecting_values (List of Objects): List with objects\n that appear in both lists\n \"\"\"\n```\n\n### (string_helpers.py)[https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures/blob/master/data_structure_helpers/string_helpers.py]\n\nModify and Work with Strings\n\nFunctions:\n\n```\ndef convert_to_title_case(string_to_convert):\n \"\"\"\n Purpose:\n Convert Any string into title case. Special characters,\n numbers, and whitespace will be removed and replaced\n with a string with each word's first letter capitalized.\n Args:\n string_to_convert (String): String convert to title case\n Returns:\n converted_string (String): String with title case\n Examples:\n >>> string_to_convert = 'some_variable_name'\n >>> convert_to_title(strings_to_convert)\n >>> 'Some Variable Name'\n \"\"\"\n```\n\n```\ndef convert_to_camel_case(string_to_convert, camel_caps=False):\n \"\"\"\n Purpose:\n Convert Any string into camelCase. Special characters,\n numbers, and whitespace will be removed and replaced\n with a string with each word's first letter capitalized.\n There will be no spaces between each work and every word\n following the first will be capitalized. If CamelCaps is\n true, the first word will also be capital\n Args:\n string_to_convert (String): String convert to title case\n camel_caps (Boolean): If first word should be capitalized\n Returns:\n converted_string (String): String with camelCase\n Examples:\n >>> string_to_convert = 'some_variable_name'\n >>> convert_to_camel_case(strings_to_convert, camel_caps=False)\n >>> 'someVariableName'\n >>> convert_to_camel_case(strings_to_convert, camel_caps=True)\n >>> 'SomeVariableName'\n \"\"\"\n```\n\n```\ndef convert_to_snake_case(string_to_convert):\n \"\"\"\n Purpose:\n Convert Any string into snake_case. Special characters,\n numbers, and whitespace will be removed and replaced\n with a string with a _ between each work and all letters\n lower case.\n Args:\n string_to_convert (String): String convert to snake_case\n Returns:\n converted_string (String): String with snake_case\n Examples:\n >>> string_to_convert = 'Some Variable Name'\n >>> convert_to_title(strings_to_convert)\n >>> 'some_variable_name'\n >>> string_to_convert = 'SomeVariableName'\n >>> convert_to_title(strings_to_convert)\n >>> 'some_variable_name'\n \"\"\"\n```\n\n\n### (tree.py)[https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures/blob/master/data_structure_helpers/tree.py]\n\nGenerate Tree for testing and traversal\n\nFunctions:\n\n```\ndef generate_tree(node_count, max_depth, max_children):\n \"\"\"\n Purpose:\n Generate A Random Tree\n Args:\n node_count (Int): Count of nodes in generated tree\n max_depth (Int): Max depth of tree\n max_children (Int): Max children per node\n Returns:\n root_node (Node Obj): Root node of the tree\n nodes (Dict of Node Obj): Nodes in the tree\n \"\"\"\n```\n\n## Example Scripts\n\nExample executable Python scripts/modules for testing and interacting with the library. These show example use-cases for the libraries and can be used as templates for developing with the libraries or to use as one-off development efforts.\n\n### N/A\n\n## Notes\n\n - Relies on f-string notation, which is limited to Python3.6. A refactor to remove these could allow for development with Python3.0.x through 3.5.x\n\n## TODO\n\n - Unittest framework in place, but lacking tests\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures", "keywords": "python,libraries", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ctodd-python-lib-data-structures", "package_url": "https://pypi.org/project/ctodd-python-lib-data-structures/", "platform": "", "project_url": "https://pypi.org/project/ctodd-python-lib-data-structures/", "project_urls": { "Homepage": "https://github.com/ChristopherHaydenTodd/ctodd-python-lib-data-structures" }, "release_url": "https://pypi.org/project/ctodd-python-lib-data-structures/1.0.0/", "requires_dist": [ "anytree (>=2.6.0)" ], "requires_python": ">3.6", "summary": "Python utilities used for interacting with Python Data Structures", "version": "1.0.0" }, "last_serial": 5169974, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "18bca9428768435ca4ad8381ea013ad4", "sha256": "aacecccc4d316700866f39428ffdcb3a33d215321666d88d66ca05677f6519d8" }, "downloads": -1, "filename": "ctodd_python_lib_data_structures-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "18bca9428768435ca4ad8381ea013ad4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.6", "size": 14474, "upload_time": "2019-04-21T14:37:35", "url": "https://files.pythonhosted.org/packages/dc/26/33dcf361ea63e2879ee630e339d59398464a14f887abf7a95930108cb474/ctodd_python_lib_data_structures-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ea39746e88272c81412f9580e35143a", "sha256": "13eeb5f3154511d5511a8c973cbb72ea2f907ecb0bb17d4387ba25fd14c5c85e" }, "downloads": -1, "filename": "ctodd-python-lib-data-structures-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4ea39746e88272c81412f9580e35143a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6", "size": 12152, "upload_time": "2019-04-21T14:37:37", "url": "https://files.pythonhosted.org/packages/0b/95/04ef913741fa8e1bbf4ddb8cd0683a97bb6df9a3bb142263ef1f2d91e2f3/ctodd-python-lib-data-structures-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "18bca9428768435ca4ad8381ea013ad4", "sha256": "aacecccc4d316700866f39428ffdcb3a33d215321666d88d66ca05677f6519d8" }, "downloads": -1, "filename": "ctodd_python_lib_data_structures-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "18bca9428768435ca4ad8381ea013ad4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.6", "size": 14474, "upload_time": "2019-04-21T14:37:35", "url": "https://files.pythonhosted.org/packages/dc/26/33dcf361ea63e2879ee630e339d59398464a14f887abf7a95930108cb474/ctodd_python_lib_data_structures-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ea39746e88272c81412f9580e35143a", "sha256": "13eeb5f3154511d5511a8c973cbb72ea2f907ecb0bb17d4387ba25fd14c5c85e" }, "downloads": -1, "filename": "ctodd-python-lib-data-structures-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4ea39746e88272c81412f9580e35143a", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6", "size": 12152, "upload_time": "2019-04-21T14:37:37", "url": "https://files.pythonhosted.org/packages/0b/95/04ef913741fa8e1bbf4ddb8cd0683a97bb6df9a3bb142263ef1f2d91e2f3/ctodd-python-lib-data-structures-1.0.0.tar.gz" } ] }