tinysdkbyRSKT 0.4.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,5 @@
1
+ dist/
2
+ __pycache__/
3
+ *.egg-info/
4
+ .venv/
5
+ .env
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.5
2
+ Name: tinysdkbyRSKT
3
+ Version: 0.4.0
4
+ Summary: A tiny example Python SDK
5
+ Author: Tarun
6
+ License: MIT
7
+ Requires-Python: >=3.9
8
+ Provides-Extra: dev
9
+ Requires-Dist: build; extra == 'dev'
10
+ Requires-Dist: hatch; extra == 'dev'
11
+ Requires-Dist: pytest; extra == 'dev'
12
+ Description-Content-Type: text/markdown
13
+
14
+ # tinysdk
15
+
16
+ A tiny example Python SDK.
17
+
18
+ ```python
19
+ from tinysdk import TinyClient
20
+ print(TinyClient("Tarun").greet())
21
+ ```
@@ -0,0 +1,8 @@
1
+ # tinysdk
2
+
3
+ A tiny example Python SDK.
4
+
5
+ ```python
6
+ from tinysdk import TinyClient
7
+ print(TinyClient("Tarun").greet())
8
+ ```
@@ -0,0 +1,22 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "tinysdkbyRSKT"
7
+ dynamic = ["version"]
8
+ description = "A tiny example Python SDK"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Tarun" }]
13
+ dependencies = []
14
+
15
+ [project.optional-dependencies]
16
+ dev = ["pytest", "build", "hatch"]
17
+
18
+ [tool.hatch.version]
19
+ path = "src/tinysdk/__init__.py"
20
+
21
+ [tool.hatch.build.targets.wheel]
22
+ packages = ["src/tinysdk"]
@@ -0,0 +1,4 @@
1
+ from .client import TinyClient
2
+
3
+ __version__ = "0.4.0"
4
+ __all__ = ["TinyClient", "__version__"]
@@ -0,0 +1,19 @@
1
+ class TinyClient:
2
+ """Minimal example client."""
3
+
4
+ def __init__(self, name: str = "world"):
5
+ self.name = name
6
+
7
+ def greet(self) -> str:
8
+ return f"Hello, {self.name}! This is the newer version of TinyClient."
9
+
10
+ def add(self, a: float, b: float) -> float:
11
+ return a + b
12
+
13
+ def multiply(self, a: float, b: float) -> float:
14
+ return a * b
15
+
16
+ def divide(self, a: float, b: float) -> float:
17
+ if b == 0:
18
+ raise ValueError("Cannot divide by zero.")
19
+ return a / b
@@ -0,0 +1,19 @@
1
+ from tinysdk import TinyClient
2
+
3
+
4
+ def test_greet():
5
+ assert TinyClient("Tarun").greet() == "Hello, Tarun! This is the newer version of TinyClient."
6
+
7
+
8
+ def test_add():
9
+ assert TinyClient().add(2, 3) == 5
10
+
11
+ def test_multiply():
12
+ assert TinyClient().multiply(2, 3) == 6
13
+
14
+ def test_divide():
15
+ assert TinyClient().divide(6, 3) == 2
16
+ try:
17
+ TinyClient().divide(6, 0)
18
+ except ValueError as e:
19
+ assert str(e) == "Cannot divide by zero."