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

🔮 Coming Soon
More number theory tools

Date/time utilities

Sorting helpers

File I/O wrappers

Contributions from the community!

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

📄 License
MIT License
Crafted with 💖 by Prathiksha J

🌐 Links
📦 Project on PyPI

💻 GitHub (coming soon)

python
Copy code

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypocketutils-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 24f81fc479e596e0b8874faa2f55e546dbca0babd33c419b94114cb97b30925f
MD5 71b7f4c8e72cc866555eb015098476ff
BLAKE2b-256 d9c280748af8b14fbfb2c460be305a90df038cca8f733689ae4b1bd12ef07ec1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypocketutils-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aba07156546586e2304b3743861308dcb2d8652bc5554cc6746df440fcdaab93
MD5 d06149986a0ac89eb3c096e053a64573
BLAKE2b-256 91545d0ef992e6b188c116bfca93711f820db150b9731d03dcde07945299cbdd

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