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.1.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.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for mytools_simple-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a0bc431adf5a8997e32d0ad630dd93e7388685449f8a3054cca6545cc246384c
MD5 3b5bb02be26566984b966044ac2ce1c4
BLAKE2b-256 630b3ba0e8dc3b758ea4fd411597e66e4ddcd2c00bfabe7b248c9e1c7ed0b006

See more details on using hashes here.

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

Hashes for mytools_simple-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8a1a4bd8d9d9eb7db67810fdb7b2f02a9ba726b602bdffec1c9cbba145b0896
MD5 9f693c6be71e7d47224495fd34d0e9e3
BLAKE2b-256 2d7d0752843faa25cd714a489d4299b9d6f4aac4ab51f7c599751411b5d006e6

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