Wolpie Logo

Wolpie#

Docs License Python Version Python Version PyPI Version codecov Known Vulnerabilities

Welcome to Wolpie! Like the banner says, I got tired of copy-pasting the same blocks of code from project to project. I already figured out how to do something the way I like, but now I have to do it all over again in a new project. I also frequently found myself installing packages that did one small thing I needed, but then I had to install a whole package just for that one thing. So I decided to create Wolpie as my own personal swiss army knife for Python development. The one package to rule them all… for my needs at least.

Over time, it will grow to include various utilities and tools that I find useful in my projects. Stay tuned

Note

You are viewing documentation for Wolpie version 0.3.0.

Current Wolpie features include:

  • pretty_str: A function similar to textwrap.shorten but with better pretty string truncation.

  • TStr: A string subclass that automatically truncates itself when it exceeds a specified length.

  • play_sound: A function for playing sound files.

  • ding: A context manager for playing a “ding” sound when a block of code finishes executing.

Installation#

You can install Wolpie from PyPI:

pip install wolpie

Quick Start#

Step 1: Identify something that frustrates you.

Step 2: Check if Wolpie has a solution for it.

Step 3: Import and use it.

from wolpie import pretty_str, ding
import time

result = pretty_str("Hello world!", max_chars=10)
print(result)  # Output: 'Hello w...'

# plays the default "ding" sound after the block finishes
with ding():
    time.sleep(10)  # Simulate some long running function

Step 4: Enjoy your newfound productivity!

Contents#

Contributing#

Contributions are welcome! Please feel free to submit a Pull Request on GitHub.

License#

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