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.0.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.0.tar.gz.
File metadata
- Download URL: mytools_simple-1.0.0.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 |
b7e2ca5c3ec5340f8a5207a3b24e9e9ae0817056af6bac7db74bc8fa528cf0ca
|
|
| MD5 |
5dbe00f97f72f4ba3ca5a00aa90da077
|
|
| BLAKE2b-256 |
f9938c86ca31373d3efc22b2f827cb425c714527c6a74e37091a4144b71d87a4
|
File details
Details for the file mytools_simple-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mytools_simple-1.0.0-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 |
d40d1d48f75aebef8f2883241cb3f39d530213508d84cda04826414ac1db405f
|
|
| MD5 |
e975569307975b40787591ead5da209e
|
|
| BLAKE2b-256 |
45eae8854aad698f918e0e18d662ab05524c9a91b04001c3249217d52d6c62ca
|