meme-errors 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.4
2
+ Name: meme-errors
3
+ Version: 0.1.0
4
+ Summary: Play funny meme sounds when Python errors occur!
5
+ Home-page: https://github.com/JAY-MU-4098/meme_errors
6
+ Author: Jay Gogra
7
+ Author-email: pyex1.1@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.7
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pygame
14
+ Requires-Dist: pydub
15
+
16
+ # Meme Errors
17
+
18
+
19
+
20
+ Play funny meme sounds whenever Python exceptions occur — **even if the error is handled!** Customize your sounds per exception type, set trim duration, and enjoy some chaotic developer humor.
21
+
22
+ ### Features
23
+ * **Automatic memes** on uncaught exceptions.
24
+ * **Handled exceptions support** via decorator or context manager.
25
+ * **Custom sounds** per exception type.
26
+ * **Automatic trimming** of long sounds (default 3 seconds).
27
+ * **Optional custom duration** per error or decorator.
28
+
29
+ ---
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ pip install meme-errors
35
+ ```
36
+
37
+ Use code with caution. Usage Global Uncaught Errors Automatically plays a meme when an exception occurs that is not handled:
38
+ ```
39
+ import meme_errors
40
+
41
+ # This will play the default Exception meme
42
+ 1 / 0 # Division by zero
43
+ ```
44
+
45
+
46
+ Custom Memes for Specific Exceptions
47
+ ```
48
+ import meme_errors
49
+
50
+ # Set a custom meme for TypeError
51
+ meme_errors.set_error_sound(TypeError, "/path/to/emotional-damage-meme.mp3")
52
+
53
+ # Set a custom meme for FileNotFoundError
54
+ meme_errors.set_error_sound(FileNotFoundError, "/path/to/galaxy-meme.mp3")
55
+ ```
56
+
57
+ Handled Exceptions Using a Decorator
58
+ ```
59
+ from meme_errors import meme_sound_on_error
60
+
61
+ @meme_sound_on_error
62
+ def risky_func():
63
+ try:
64
+ open("missing_file.txt") # FileNotFoundError
65
+ except FileNotFoundError:
66
+ print("Caught the error, but meme still plays!")
67
+
68
+ risky_func()
69
+ ```
70
+
71
+ Custom Duration for Decorator
72
+ ```
73
+ # Set duration to 5 seconds
74
+ risky_func = meme_sound_on_error(risky_func, duration_ms=5000)
75
+ ```
76
+ Manual Meme Playback
77
+
78
+ ```
79
+ from meme_errors import play_meme_sound
80
+
81
+ # Play TypeError meme for default 3 seconds
82
+ play_meme_sound(TypeError)
83
+
84
+ # Play TypeError meme for 5 seconds
85
+ play_meme_sound(TypeError, duration_ms=5000)
86
+ ```
87
+ Default Memes Included:
88
+
89
+ | Exception Type | Default Meme File |
90
+ |-----------------------|----------------------------------------|
91
+ | TypeError | emotional-damage-meme.mp3 |
92
+ | FileNotFoundError | galaxy-meme.mp3 |
93
+ | Exception (fallback) | meme-de-creditos-finales.mp3 |
94
+
95
+ You can replace these using `set_error_sound()`.
96
+
97
+ ## Notes:
98
+
99
+ - **Audio Trimming:** Audio is trimmed to a default of 3 seconds to prevent long playback.
100
+ - **Compatibility:** Works on Windows, macOS, and Linux (requires `playsound` and `pydub`).
101
+ - **Non-blocking:** Playback is handled via `playsound`.
102
+
103
+ ## License:
104
+
105
+ MIT License – see [LICENSE](LICENSE) file.
106
+
107
+ ## Contributing:
108
+
109
+ Fork the repo, add your own meme sounds or improve features, and submit a Pull Request.
110
+ Have fun making Python errors **hilarious!** 😂
@@ -0,0 +1,4 @@
1
+ meme_errors-0.1.0.dist-info/METADATA,sha256=vRXCNblNeUyc0F8n4rrLtVO0yYVYSy86Mzn-L3rpW2c,3093
2
+ meme_errors-0.1.0.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
3
+ meme_errors-0.1.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ meme_errors-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+