superutilities


Namesuperutilities JSON
Version 0.2.2 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-10-21 02:13:55
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.


- **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/bb/02/139356645dcaf579ac6b3424aae9f9807fcb9442c464a4d71a54db29315e/superutilities-0.2.2.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\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.2",
    "project_urls": {
        "Homepage": "https://github.com/EnvyingGolem47/SuperUtilities-Python3"
    },
    "split_keywords": [
        "superutilities",
        " super",
        " utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "36602e54d9611d1d50aaedb0033391728a16d5a0ef03b3a39d499758be011e97",
                "md5": "c91d9d62b3b7ca6c354bcdf932651eb7",
                "sha256": "dfce43fe5515de14737566c815830a606c6fb42685edc6540a1106f8b33aefc6"
            },
            "downloads": -1,
            "filename": "superutilities-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c91d9d62b3b7ca6c354bcdf932651eb7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7301,
            "upload_time": "2024-10-21T02:13:53",
            "upload_time_iso_8601": "2024-10-21T02:13:53.210229Z",
            "url": "https://files.pythonhosted.org/packages/36/60/2e54d9611d1d50aaedb0033391728a16d5a0ef03b3a39d499758be011e97/superutilities-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb02139356645dcaf579ac6b3424aae9f9807fcb9442c464a4d71a54db29315e",
                "md5": "6d923ca610082b7789f524f568533887",
                "sha256": "93707c026b657bb7136414d1152fafe30c71de90686c5381fbe55f51d7ebc47e"
            },
            "downloads": -1,
            "filename": "superutilities-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6d923ca610082b7789f524f568533887",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7000,
            "upload_time": "2024-10-21T02:13:55",
            "upload_time_iso_8601": "2024-10-21T02:13:55.155155Z",
            "url": "https://files.pythonhosted.org/packages/bb/02/139356645dcaf579ac6b3424aae9f9807fcb9442c464a4d71a54db29315e/superutilities-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-21 02:13:55",
    "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: 0.38280s