quickmath-tools 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,32 @@
1
+ """Basic arithmetic helpers."""
2
+
3
+ from typing import Union
4
+
5
+ Number = Union[int, float]
6
+
7
+
8
+ def add(a: Number, b: Number) -> Number:
9
+ """Return the sum of two numbers."""
10
+ return a + b
11
+
12
+
13
+ def subtract(a: Number, b: Number) -> Number:
14
+ """Return the difference of two numbers."""
15
+ return a - b
16
+
17
+
18
+ def multiply(a: Number, b: Number) -> Number:
19
+ """Return the product of two numbers."""
20
+ return a * b
21
+
22
+
23
+ def divide(a: Number, b: Number) -> float:
24
+ """Return a divided by b.
25
+
26
+ Raises:
27
+ ZeroDivisionError: If b is zero.
28
+ """
29
+ return a / b
30
+
31
+
32
+ __all__ = ["Number", "add", "subtract", "multiply", "divide"]
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.4
2
+ Name: quickmath-tools
3
+ Version: 0.1.0
4
+ Summary: A small collection of basic arithmetic operations.
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+
8
+ # quickmath-tools
9
+
10
+ A small Python package with basic arithmetic helpers.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install quickmath-tools
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```python
21
+ from quickmath_tools import add, divide, multiply, subtract
22
+
23
+ print(add(2, 3)) # 5
24
+ print(subtract(5, 2)) # 3
25
+ print(multiply(4, 3)) # 12
26
+ print(divide(9, 3)) # 3.0
27
+ ```
28
+
29
+ `divide(a, b)` raises `ZeroDivisionError` when `b` is zero.
@@ -0,0 +1,5 @@
1
+ quickmath_tools/__init__.py,sha256=Wlm9NpHnkq9BSzktnya7t2z8hyWNPBAh6KYpfPAChvo,660
2
+ quickmath_tools-0.1.0.dist-info/METADATA,sha256=1vMYLSBcJzQCUJFKnJgemNRnZ3xw6uF48wkLmb6F0LA,596
3
+ quickmath_tools-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
4
+ quickmath_tools-0.1.0.dist-info/top_level.txt,sha256=n_R8yXHSnGX1kzz0lISr5ikGOQWy8cXIifXulxYAemE,16
5
+ quickmath_tools-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ quickmath_tools