Skip to main content

A beginner-friendly utility module with handy math, string, and list functions

Project description

HandyUtils

HandyUtils is a beginner-friendly Python module that offers a rich collection of everyday utility functions — all in one place!
Perfect for beginners, students, and anyone who’s tired of writing the same helper code again and again.


✨ Features

  • 🔢 Math Utilities

    • factorial(n) – Calculates the factorial
    • fibonacci(n) – Generates Fibonacci series
    • is_prime(n) – Checks for prime numbers
    • is_armstrong(n) – Armstrong number checker
    • sum_of_digits(n) – Sum of digits
    • gcd(a, b) and lcm(a, b) – Find GCD and LCM
  • 🔤 String Utilities

    • is_palindrome(s) – Palindrome checker
    • reverse_string(s) – Reverses a string
    • toggle_case(s) – Switch case of all characters
    • count_vowels(s) – Counts the number of vowels
    • are_anagrams(s1, s2) – Anagram checker
  • 🔁 Conversion Utilities

    • decimal_to_binary(n)
    • binary_to_decimal(b)
    • decimal_to_hex(n)
    • hex_to_decimal(h)
  • 📋 List Utilities

    • find_duplicates(lst) – Detects duplicate values
    • flatten_list(nested_list) – Flattens nested lists
    • chunk_list(lst, chunk_size) – Splits lists into chunks

📦 Installation

Install it via pip command

pip install handyutils
🚀 Usage Example
python
Copy code
from handyutils import factorial, is_palindrome, fibonacci, is_prime

print(factorial(5))             # Output: 120
print(is_palindrome("madam"))   # Output: True
print(fibonacci(6))             # Output: [0, 1, 1, 2, 3, 5]
print(is_prime(13))             # Output: True
📚 Full Function List
is_palindrome(s)

factorial(n)

fibonacci(n)

is_prime(num)

gcd(a, b)

lcm(a, b)

sum_of_digits(n)

is_armstrong(n)

reverse_string(s)

toggle_case(s)

count_vowels(s)

are_anagrams(s1, s2)

decimal_to_binary(n)

binary_to_decimal(b)

decimal_to_hex(n)

hex_to_decimal(h)

find_duplicates(lst)

flatten_list(nested_list)

chunk_list(lst, chunk_size)

🙋‍♀️ Author
Created with ❤️ by Prathiksha J
GitHub: @prathikshaj1203

📝 License
This project is licensed under the MIT License  see the LICENSE file for details.

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

pypocketutils-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pypocketutils-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pypocketutils-0.1.0.tar.gz.

File metadata

  • Download URL: pypocketutils-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pypocketutils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d13f5020cc31d92d913c198e61f1b90b431be872962f3caab3fc019b9fac7b9
MD5 4a373896619e96296287307d95fb4752
BLAKE2b-256 73c77831ec590a1cd7bcc784a7288f457df8d974ea7229afc7e5c553f72942ab

See more details on using hashes here.

File details

Details for the file pypocketutils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypocketutils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pypocketutils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 434ff17b8e5623b8374056b74fde16abbebf4e35663ed91f405e2c284a5db7c2
MD5 9db5dbe09bb7c9547ffa5460de7ae114
BLAKE2b-256 bf056e9a5c5a002b604bcd0f37a5832937f335be6e00abd0668db2f406d9c714

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