HiHelloLib 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.
@@ -0,0 +1,16 @@
1
+ import random
2
+
3
+ def genHiHello() -> str:
4
+ return ["Hi","Hello"][random.randint(0,1)]
5
+
6
+ def respond(msg: str) -> str:
7
+ """
8
+ HiHelloライブラリの応答関数
9
+ """
10
+ msg = msg.strip()
11
+ if msg == "Hi":
12
+ return "Hello"
13
+ elif msg == "Hello":
14
+ return "Hi"
15
+ else:
16
+ raise ValueError(f"Unsupported message: {msg}")
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.4
2
+ Name: HiHelloLib
3
+ Version: 0.1.0
4
+ Summary: Simple HiHello responder library
5
+ Author-email: Oywe <ncql@proton.me>
6
+ License: MIT
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
9
+
10
+ # HiHello
11
+
12
+ HiHello
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ HiHello/__init__.py
4
+ HiHelloLib.egg-info/PKG-INFO
5
+ HiHelloLib.egg-info/SOURCES.txt
6
+ HiHelloLib.egg-info/dependency_links.txt
7
+ HiHelloLib.egg-info/top_level.txt
8
+ tests/test_first.py
@@ -0,0 +1 @@
1
+ HiHello
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.4
2
+ Name: HiHelloLib
3
+ Version: 0.1.0
4
+ Summary: Simple HiHello responder library
5
+ Author-email: Oywe <ncql@proton.me>
6
+ License: MIT
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
9
+
10
+ # HiHello
11
+
12
+ HiHello
@@ -0,0 +1,3 @@
1
+ # HiHello
2
+
3
+ HiHello
@@ -0,0 +1,12 @@
1
+ [build-system]
2
+ requires = ["setuptools>=65.5.1", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name ="HiHelloLib"
7
+ version = "0.1.0"
8
+ description = "Simple HiHello responder library"
9
+ authors = [{name="Oywe", email="ncql@proton.me"}]
10
+ readme = "README.md"
11
+ requires-python = ">=3.8"
12
+ license = {text = "MIT"}
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,12 @@
1
+ from HiHello import respond
2
+ import pytest
3
+
4
+ def test_hi():
5
+ assert respond("Hi") == "Hello"
6
+
7
+ def test_hello():
8
+ assert respond("Hello") == "Hi"
9
+
10
+ def test_error():
11
+ with pytest.raises(ValueError):
12
+ respond("Bye")