Metadata-Version: 2.1
Name: ItsUtils
Version: 0.2.2
Summary: A Package containing utils created by ItsNameless
Author: ItsNameless
License: MIT License
        
        Copyright (c) 2022-present ItsNameless
        
        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.
        
Project-URL: Homepage, https://github.com/TheItsProjects/ItsUtils
Project-URL: Repository, https://github.com/TheItsProjects/ItsUtils
Project-URL: Issue Tracker, https://github.com/TheItsProjects/ItsUtils/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# ItsUtils

ItsUtils is a small utility-package created by ItsNameless.

The package contains some small utilities that i created for some bigger projects and that i wanted to give to the public, so you can create bigger projects too!

## Installing

To install this package, simply use pip:

```
pip install ItsUtils
```

Or install the development version using:

```
pip install git+https://github.com/TheItsProjects/ItsUtils
```

## Contributing

If you want to give me an idea for a new feature or want to create new features yourself, you can visit the GitHub Repository for this project:

https://github.com/TheItsProjects/ItsUtils

## Features

These are the currently available features:

### StringMath

```py
from its_utils.string_math import StringMath

print(StringMath.full('1*10^45*(3+5)'))
```

This utility calculates the result of a stringified mathematical expression and returns the result as an integer.

It uses the Shunting-Yard algorithm and follows the correct order of operation rules.

If you provide an empty string as the input, a `ValueError` will be raised.

The function `StringMath.check_valid_expression()` can be used to check whether a string is valid and can be processed. If the string is valid, the function will return `True`.

### WordMath

```py
from its_utils.word_math import WordMath

print(WordMath.full('siebentausendvierhundertunddreiundachtzig'))
```

This utility returns the integer expression of a numeral.

Currently, it only works for the german language, but i may be later extended to support other languages too.

It works with numbers up to `999,999,999 (neunhundertneunundneunzig millionen neunhundertneunundneunzigtausendneunhundertundneunundneunzig)`, but may be later extend to even bigger numbers.

### DebugPrompt

```py
from its_utils.debug_prompt import Input

inp = Input.input("Type your name: ", 5)
```

This utility can get an input from the user for a given number of seconds. If no input was given after these seconds, it timeouts and returns None.
