Skip to main content

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 numbers
  • subtract(a, b) - Subtract two numbers
  • multiply(a, b) - Multiply two numbers
  • divide(a, b) - Divide two numbers
  • factorial(n) - Calculate factorial

String Operations

  • greet(name) - Greet someone
  • reverse_string(text) - Reverse a string
  • to_uppercase(text) - Convert to uppercase
  • to_lowercase(text) - Convert to lowercase
  • count_words(text) - Count words in string
  • is_palindrome(text) - Check if palindrome

Number Operations

  • is_even(number) - Check if even

Temperature Conversion

  • celsius_to_fahrenheit(celsius) - Convert C to F
  • fahrenheit_to_celsius(fahrenheit) - Convert F to C

License

MIT

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mytools_simple-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for mytools_simple-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b7e2ca5c3ec5340f8a5207a3b24e9e9ae0817056af6bac7db74bc8fa528cf0ca
MD5 5dbe00f97f72f4ba3ca5a00aa90da077
BLAKE2b-256 f9938c86ca31373d3efc22b2f827cb425c714527c6a74e37091a4144b71d87a4

See more details on using hashes here.

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

Hashes for mytools_simple-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d40d1d48f75aebef8f2883241cb3f39d530213508d84cda04826414ac1db405f
MD5 e975569307975b40787591ead5da209e
BLAKE2b-256 45eae8854aad698f918e0e18d662ab05524c9a91b04001c3249217d52d6c62ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page