Skip to main content

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

Project description

pypocketutils

🚀 A pocket-sized Python module loaded with powerful, ready-to-use utility functions.
Perfect for students, developers, and anyone who wants to avoid rewriting basic logic again and again.


📦 Installation

pip install pypocketutils

📚 Available Functions
| Function                      | Description                                            |
| ----------------------------- | ------------------------------------------------------ |
| `is_palindrome(s)`            | Checks if a string or number is a palindrome           |
| `factorial(n)`                | Calculates the factorial of a non-negative integer     |
| `fibonacci(n)`                | Generates the first `n` Fibonacci numbers as a list    |
| `is_prime(num)`               | Determines if a number is prime                        |
| `gcd(a, b)`                   | Finds the Greatest Common Divisor of two numbers       |
| `lcm(a, b)`                   | Finds the Least Common Multiple of two numbers         |
| `sum_of_digits(n)`            | Returns the sum of all digits in a number              |
| `is_armstrong(n)`             | Checks if a number is an Armstrong number              |
| `reverse_string(s)`           | Reverses the characters in a string                    |
| `toggle_case(s)`              | Toggles the case of each character in a string         |
| `count_vowels(s)`             | Counts the number of vowels in a string                |
| `are_anagrams(s1, s2)`        | Checks if two strings are anagrams of each other       |
| `decimal_to_binary(n)`        | Converts a decimal number to a binary string           |
| `decimal_to_hex(n)`           | Converts a decimal number to a hexadecimal string      |
| `binary_to_decimal(b)`        | Converts a binary string to a decimal number           |
| `hex_to_decimal(h)`           | Converts a hexadecimal string to a decimal number      |
| `find_duplicates(lst)`        | Returns a list of duplicate elements in a list         |
| `flatten_list(nested_list)`   | Flattens a nested list of any depth into a single list |
| `chunk_list(lst, chunk_size)` | Splits a list into smaller chunks of a given size      |


💻 Example Usage
python
Copy code
from pypocketutils import is_palindrome, factorial, fibonacci, is_prime

print(is_palindrome("madam"))      # True
print(factorial(5))                # 120
print(fibonacci(6))                # [0, 1, 1, 2, 3, 5]
print(is_prime(17))                # True

🎯 Who Should Use This?
✨ Students preparing for coding interviews or tests

🔧 Developers who want quick access to basic operations

🧪 Hackers who love clean and reusable functions

🐍 Python beginners wanting to learn from examples


🤝 Contributing
Have a cool utility in mind?
Fork the repo (coming soon), raise an issue, or submit a pull request!

📄 License
MIT License
Crafted with 💖 by Prathiksha J

🌐 Links
📦 Project on PyPI
💻 GitHub (coming soon)

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.2.tar.gz (5.0 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.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypocketutils-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 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.2.tar.gz
Algorithm Hash digest
SHA256 11ed97c79c249c4dca3246f120934fa2500525f9b4659aae3136923d9ec87737
MD5 ec845f379c407bcb6a357543b596db7c
BLAKE2b-256 0042d5dabc5fbcea9ce5034fbd3a7a80caadf36f8a5f14d9e7345ce7bccb4301

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypocketutils-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 36399e9143ce15827aa35d5e1767a8e287b93ea995a0265514f95d82b622df17
MD5 140097b8d0e7fd1fb99eb2723d5ed157
BLAKE2b-256 4ecc83c1f31ec8ec031a1337822b47ecf8090f369f22ef3f4e44b5b494521f01

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