A simple collection of useful Python utility functions
Project description
MyTools
A simple collection of useful Python utility functions.
Installation
pip install mytools-simple
Usage
from mytools import greet, add, reverse_string, factorial
# Greet someone
print(greet("John")) # Hello, John!
# Math operations
print(add(5, 3)) # 8
print(multiply(4, 7)) # 28
# String operations
print(reverse_string("Python")) # nohtyP
print(to_uppercase("hello")) # HELLO
# Other functions
print(factorial(5)) # 120
print(is_palindrome("racecar")) # True
print(celsius_to_fahrenheit(100)) # 212.0
Available Functions
Math Operations
add(a, b)- Add two numberssubtract(a, b)- Subtract two numbersmultiply(a, b)- Multiply two numbersdivide(a, b)- Divide two numbersfactorial(n)- Calculate factorial
String Operations
greet(name)- Greet someonereverse_string(text)- Reverse a stringto_uppercase(text)- Convert to uppercaseto_lowercase(text)- Convert to lowercasecount_words(text)- Count words in stringis_palindrome(text)- Check if palindrome
Number Operations
is_even(number)- Check if even
Temperature Conversion
celsius_to_fahrenheit(celsius)- Convert C to Ffahrenheit_to_celsius(fahrenheit)- Convert F to C
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mytools_simple-1.0.1.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mytools_simple-1.0.1.tar.gz.
File metadata
- Download URL: mytools_simple-1.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0bc431adf5a8997e32d0ad630dd93e7388685449f8a3054cca6545cc246384c
|
|
| MD5 |
3b5bb02be26566984b966044ac2ce1c4
|
|
| BLAKE2b-256 |
630b3ba0e8dc3b758ea4fd411597e66e4ddcd2c00bfabe7b248c9e1c7ed0b006
|
File details
Details for the file mytools_simple-1.0.1-py3-none-any.whl.
File metadata
- Download URL: mytools_simple-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8a1a4bd8d9d9eb7db67810fdb7b2f02a9ba726b602bdffec1c9cbba145b0896
|
|
| MD5 |
9f693c6be71e7d47224495fd34d0e9e3
|
|
| BLAKE2b-256 |
2d7d0752843faa25cd714a489d4299b9d6f4aac4ab51f7c599751411b5d006e6
|