muck-sig 0.1.0__tar.gz

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.
muck_sig-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Muck
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.5
2
+ Name: muck_sig
3
+ Version: 0.1.0
4
+ Summary: A small attribution banner for Python projects made by Muck.
5
+ Project-URL: Discord, https://discord.gg/JjkF6YENgy
6
+ Author: Muck
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+
15
+ # muck_sig
16
+
17
+ Add a short Muck attribution banner to a Python project.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ pip install muck_sig
23
+ ```
24
+
25
+ ## Use
26
+
27
+ ```python
28
+ from muck_sig import sign
29
+
30
+ sign()
31
+ ```
32
+
33
+ This prints:
34
+
35
+ ```text
36
+ This project is made by Muck, https://discord.gg/JjkF6YENgy
37
+ ```
38
+
39
+ By default, the message remains visible for two seconds and then the terminal is cleared. Configure either behavior when needed:
40
+
41
+ ```python
42
+ sign(delay=0, clear_screen=False)
43
+ ```
44
+
45
+ ## Publishing to PyPI
46
+
47
+ Choose an available project name on PyPI if `muck_sig` is already taken, then build and upload:
48
+
49
+ ```bash
50
+ python -m pip install --upgrade build twine
51
+ python -m build
52
+ python -m twine upload dist/*
53
+ ```
@@ -0,0 +1,39 @@
1
+ # muck_sig
2
+
3
+ Add a short Muck attribution banner to a Python project.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install muck_sig
9
+ ```
10
+
11
+ ## Use
12
+
13
+ ```python
14
+ from muck_sig import sign
15
+
16
+ sign()
17
+ ```
18
+
19
+ This prints:
20
+
21
+ ```text
22
+ This project is made by Muck, https://discord.gg/JjkF6YENgy
23
+ ```
24
+
25
+ By default, the message remains visible for two seconds and then the terminal is cleared. Configure either behavior when needed:
26
+
27
+ ```python
28
+ sign(delay=0, clear_screen=False)
29
+ ```
30
+
31
+ ## Publishing to PyPI
32
+
33
+ Choose an available project name on PyPI if `muck_sig` is already taken, then build and upload:
34
+
35
+ ```bash
36
+ python -m pip install --upgrade build twine
37
+ python -m build
38
+ python -m twine upload dist/*
39
+ ```
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "muck_sig"
7
+ version = "0.1.0"
8
+ description = "A small attribution banner for Python projects made by Muck."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Muck" }]
13
+ classifiers = [
14
+ "License :: OSI Approved :: MIT License",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3 :: Only",
17
+ ]
18
+
19
+ [project.urls]
20
+ Discord = "https://discord.gg/JjkF6YENgy"
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ packages = ["src/muck_sig"]
@@ -0,0 +1,5 @@
1
+ """Project attribution banner for Muck-made Python projects."""
2
+
3
+ from .signature import DISCORD_URL, MESSAGE, sign
4
+
5
+ __all__ = ["DISCORD_URL", "MESSAGE", "sign"]
@@ -0,0 +1,24 @@
1
+ """Utilities for showing the Muck project attribution banner."""
2
+
3
+ import os
4
+ import time
5
+
6
+ DISCORD_URL = "https://discord.gg/JjkF6YENgy"
7
+ MESSAGE = f"This project is made by Muck, {DISCORD_URL}"
8
+
9
+
10
+ def sign(delay: float = 2, clear_screen: bool = True) -> None:
11
+ """Print Muck's attribution, optionally wait, then clear the terminal.
12
+
13
+ Args:
14
+ delay: Seconds to leave the message visible. Must not be negative.
15
+ clear_screen: Whether to clear the current terminal afterwards.
16
+ """
17
+ if delay < 0:
18
+ raise ValueError("delay must be zero or greater")
19
+
20
+ print(MESSAGE)
21
+ time.sleep(delay)
22
+
23
+ if clear_screen:
24
+ os.system("cls" if os.name == "nt" else "clear")
@@ -0,0 +1,14 @@
1
+ import pytest
2
+
3
+ from muck_sig import MESSAGE, sign
4
+
5
+
6
+ def test_sign_prints_message_without_clearing(capsys):
7
+ sign(delay=0, clear_screen=False)
8
+
9
+ assert capsys.readouterr().out == f"{MESSAGE}\n"
10
+
11
+
12
+ def test_sign_rejects_negative_delay():
13
+ with pytest.raises(ValueError, match="delay must be zero or greater"):
14
+ sign(delay=-1, clear_screen=False)