https://github.com/theitsprojects/itsutils
a utility package created and published by ItsNameless
https://github.com/theitsprojects/itsutils
python python3 utilites utility
Last synced: 3 months ago
JSON representation
a utility package created and published by ItsNameless
- Host: GitHub
- URL: https://github.com/theitsprojects/itsutils
- Owner: TheItsProjects
- License: mit
- Created: 2022-07-01T15:56:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T10:20:58.000Z (over 2 years ago)
- Last Synced: 2025-03-09T03:46:22.635Z (4 months ago)
- Topics: python, python3, utilites, utility
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 StringMathprint(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 WordMathprint(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 Inputinp = 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.