superutilities


Namesuperutilities JSON
Version 0.2.3 PyPI version JSON
download
home_pageNone
SummaryA custom made python 3 file that adds some features that aim to streamline the coding process. This was made primarily for a python coding class, apologies it is a little out of the blue.
upload_time2024-11-05 18:51:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2024 EnvyingGolem47 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords superutilities super utilities
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SuperUtilities-Python3
A custom made python 3 file that adds some features that aim to streamline the coding process.

This was made primarily for a python coding class, apologies it is a little out of the blue.

### Installation:
`pip install superutilities`

### Functions:

- **SInput**: A beefed up version of input(), has built in error handling, allows for automatic type conversion and retries, along with gui support.
  - prompt:str - The prompt you wish to ask the user.
  - IsInt:bool - Should the user's input be a returned as an integer?
  - IsBool:bool - Should the user's input be a returned as a bool?
  - IsFloat:bool - Should the user's input be a returned as a float?
  - acceptedAnswers:list - List of accepted answers. If list is not empty it will ask the user to retry if input is not in this list.
  - AACaseSensitive:bool - If accepted answers should be case-sensitive.
  - UseRegularExpression:bool - Use regex to determine if the input is valid or not. (See RegularExpression variable to set regex.)
  - RegularExpression - The regex to use if the input is valid. `r''`
  - ReturnREListOnly:bool - Bypasses ALL other arguments and returns a list of accepted inputs found by regex.
  - printBypass:bool - Disables the print function.
  - inputBypass - The user's input given by a separate function (For use in GUI environments).
  - useInputBypass:bool - Should the function use the input given from the inputBypass argument.
 

- **SanitizeString**: A function that removes, strips, and detects certain combinations of strings or regex within other strings. Built with the idea of being used to prevent inputs that could lead to unintended outputs.
  - string:str - The string to sanitize.
  - TestFor:bool - Returns true if it finds a 'banned character' in the string.
  - PrintFound:bool - Makes TestFor return the characters found in the string. (Must have TestFor set to true for it to have any effect)
  - bannedCharacters:list - A list of strings of banned characters to remove from the string.
  - replaceWith: - A string to replace sanitized characters with. Default is nothing.


- **PermutationCalculator**: A small function that returns the number of possible combinations of certain points and values.
  - NumOfPoints:int - Number of points/spots for a value to be.
  - NumOfValues:int - Number of values that a point/spot could have.
 

- **CombinationsCalculator**: Just a shortcut for calculating combinations.
  - NumOfPoints:int - Number of points/spots for a value to be.
  - NumOfValues:int - Number of values that a point/spot could have.


- **GetMedian**: Returns the middle of a list, with a bool to automatically sort it for you.
  - inputList:list - The list to get the median of.
  - sortList:bool - Should python sort the list automatically?
  - IsNotOnlyNumbers:bool - If the list contains more than just numbers, set to true.
 
 
- **saveJsonToFile**: Saves a dictionary or list variable as a '.json' file.
  - file_path:str - The file's path to write/save to.
  - data - A dictionary or list to save as JSON data
 

- **getJsonFromFile**: Reads and returns a '.json' file as a dictionary or list.
  - file_path:str - The file's path to read from.

### Classes:

- **ConflictingInputsDetected**: An error class that is fired when using conflicting arguments in a function.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "superutilities",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "superutilities, super, utilities",
    "author": null,
    "author_email": "EnvyingGolem47 <envyinggolem47@projectnightfall.net>",
    "download_url": "https://files.pythonhosted.org/packages/b3/81/7c84831e277e6583188517a3a4269f75c15584d1d992411847022cf838fc/superutilities-0.2.3.tar.gz",
    "platform": null,
    "description": "# SuperUtilities-Python3\r\nA custom made python 3 file that adds some features that aim to streamline the coding process.\r\n\r\nThis was made primarily for a python coding class, apologies it is a little out of the blue.\r\n\r\n### Installation:\r\n`pip install superutilities`\r\n\r\n### Functions:\r\n\r\n- **SInput**: A beefed up version of input(), has built in error handling, allows for automatic type conversion and retries, along with gui support.\r\n  - prompt:str - The prompt you wish to ask the user.\r\n  - IsInt:bool - Should the user's input be a returned as an integer?\r\n  - IsBool:bool - Should the user's input be a returned as a bool?\r\n  - IsFloat:bool - Should the user's input be a returned as a float?\r\n  - acceptedAnswers:list - List of accepted answers. If list is not empty it will ask the user to retry if input is not in this list.\r\n  - AACaseSensitive:bool - If accepted answers should be case-sensitive.\r\n  - UseRegularExpression:bool - Use regex to determine if the input is valid or not. (See RegularExpression variable to set regex.)\r\n  - RegularExpression - The regex to use if the input is valid. `r''`\r\n  - ReturnREListOnly:bool - Bypasses ALL other arguments and returns a list of accepted inputs found by regex.\r\n  - printBypass:bool - Disables the print function.\r\n  - inputBypass - The user's input given by a separate function (For use in GUI environments).\r\n  - useInputBypass:bool - Should the function use the input given from the inputBypass argument.\r\n \r\n\r\n- **SanitizeString**: A function that removes, strips, and detects certain combinations of strings or regex within other strings. Built with the idea of being used to prevent inputs that could lead to unintended outputs.\r\n  - string:str - The string to sanitize.\r\n  - TestFor:bool - Returns true if it finds a 'banned character' in the string.\r\n  - PrintFound:bool - Makes TestFor return the characters found in the string. (Must have TestFor set to true for it to have any effect)\r\n  - bannedCharacters:list - A list of strings of banned characters to remove from the string.\r\n  - replaceWith: - A string to replace sanitized characters with. Default is nothing.\r\n\r\n\r\n- **PermutationCalculator**: A small function that returns the number of possible combinations of certain points and values.\r\n  - NumOfPoints:int - Number of points/spots for a value to be.\r\n  - NumOfValues:int - Number of values that a point/spot could have.\r\n \r\n\r\n- **CombinationsCalculator**: Just a shortcut for calculating combinations.\r\n  - NumOfPoints:int - Number of points/spots for a value to be.\r\n  - NumOfValues:int - Number of values that a point/spot could have.\r\n\r\n\r\n- **GetMedian**: Returns the middle of a list, with a bool to automatically sort it for you.\r\n  - inputList:list - The list to get the median of.\r\n  - sortList:bool - Should python sort the list automatically?\r\n  - IsNotOnlyNumbers:bool - If the list contains more than just numbers, set to true.\r\n \r\n \r\n- **saveJsonToFile**: Saves a dictionary or list variable as a '.json' file.\r\n  - file_path:str - The file's path to write/save to.\r\n  - data - A dictionary or list to save as JSON data\r\n \r\n\r\n- **getJsonFromFile**: Reads and returns a '.json' file as a dictionary or list.\r\n  - file_path:str - The file's path to read from.\r\n\r\n### Classes:\r\n\r\n- **ConflictingInputsDetected**: An error class that is fired when using conflicting arguments in a function.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 EnvyingGolem47  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A custom made python 3 file that adds some features that aim to streamline the coding process. This was made primarily for a python coding class, apologies it is a little out of the blue.",
    "version": "0.2.3",
    "project_urls": {
        "Homepage": "https://github.com/EnvyingGolem47/SuperUtilities-Python3"
    },
    "split_keywords": [
        "superutilities",
        " super",
        " utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6ae262b9cfe4d652729c6a38acbc9afe0e8fcbc161fd9efba351123dde6af48",
                "md5": "f42d64a60880c304d85d357bf595182c",
                "sha256": "1d0c7f3d6a23128adee7f6df92af0e719f2bd778f9176ca27d6815c404a81e83"
            },
            "downloads": -1,
            "filename": "superutilities-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f42d64a60880c304d85d357bf595182c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7392,
            "upload_time": "2024-11-05T18:51:03",
            "upload_time_iso_8601": "2024-11-05T18:51:03.787915Z",
            "url": "https://files.pythonhosted.org/packages/d6/ae/262b9cfe4d652729c6a38acbc9afe0e8fcbc161fd9efba351123dde6af48/superutilities-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3817c84831e277e6583188517a3a4269f75c15584d1d992411847022cf838fc",
                "md5": "3771f86bb9a8c70b5b91fabb5b9a2bdb",
                "sha256": "33384edab155265375b5f2a09d497facf35779e499e5596146fe8bdf0c26e3e8"
            },
            "downloads": -1,
            "filename": "superutilities-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3771f86bb9a8c70b5b91fabb5b9a2bdb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7124,
            "upload_time": "2024-11-05T18:51:04",
            "upload_time_iso_8601": "2024-11-05T18:51:04.806180Z",
            "url": "https://files.pythonhosted.org/packages/b3/81/7c84831e277e6583188517a3a4269f75c15584d1d992411847022cf838fc/superutilities-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-05 18:51:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EnvyingGolem47",
    "github_project": "SuperUtilities-Python3",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "superutilities"
}
        
Elapsed time: 4.04848s