fyrefly 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.
fyrefly/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ """Fyrefly: simple, flexible arithmetic for any count of numbers."""
2
+
3
+ from .core import add, mul, div
4
+
5
+ __all__ = ["add", "mul", "div"]
6
+ __version__ = "0.1.0"
fyrefly/core.py ADDED
@@ -0,0 +1,37 @@
1
+ def add(*nos):
2
+ """Adds any count of numbers passed as separate arguments.
3
+
4
+ Example:
5
+ add(5, 4, 6, 10) -> 25
6
+ """
7
+ return sum(nos)
8
+
9
+
10
+ def mul(*nos):
11
+ """Multiplies any count of numbers passed as separate arguments.
12
+
13
+ Example:
14
+ mul(5, 4, 6, 10) -> 1200
15
+ """
16
+ result = 1
17
+ for n in nos:
18
+ result *= n
19
+ return result
20
+
21
+
22
+ def div(*nos):
23
+ """Divides numbers in sequence: first / second / third ...
24
+
25
+ Example:
26
+ div(100, 5, 2) -> 10.0
27
+
28
+ Raises:
29
+ ValueError: if no numbers are passed.
30
+ ZeroDivisionError: if any number after the first is zero.
31
+ """
32
+ if not nos:
33
+ raise ValueError("div() requires at least one number")
34
+ res = nos[0]
35
+ for n in nos[1:]:
36
+ res = res / n
37
+ return res
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.5
2
+ Name: fyrefly
3
+ Version: 0.1.0
4
+ Summary: Simple, flexible functions to add, multiply, and divide any count of numbers
5
+ Project-URL: Homepage, https://github.com/yourusername/fyrefly
6
+ Project-URL: Repository, https://github.com/yourusername/fyrefly
7
+ Author-email: Your Name <you@example.com>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: arithmetic,math,quant,utility
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.9
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest>=7.0; extra == 'dev'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Fyrefly
25
+
26
+ Simple, flexible functions to add, multiply, and divide **any count of numbers**.
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install fyrefly
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ```python
37
+ from fyrefly import add, mul, div
38
+
39
+ add(5, 4, 6, 10) # 25
40
+ mul(5, 4, 6, 10) # 1200
41
+ div(100, 5, 2) # 10.0
42
+ ```
43
+
44
+ Each function accepts any number of arguments:
45
+
46
+ ```python
47
+ add(1) # 1
48
+ add(1, 2, 3, 4, 5) # 15
49
+ mul() # 1 (identity)
50
+ ```
51
+
52
+ ## Functions
53
+
54
+ | Function | Description |
55
+ |---|---|
56
+ | `add(*nos)` | Adds all given numbers |
57
+ | `mul(*nos)` | Multiplies all given numbers |
58
+ | `div(*nos)` | Divides left to right: first ÷ second ÷ third ... |
59
+
60
+ ## Development
61
+
62
+ ```bash
63
+ pip install -e ".[dev]"
64
+ pytest
65
+ ```
66
+
67
+ ## License
68
+
69
+ MIT
@@ -0,0 +1,6 @@
1
+ fyrefly/__init__.py,sha256=MKWnT3Tnh1I0FpgJYCA3zDk165R_dZ85UZM2DeEB8k0,157
2
+ fyrefly/core.py,sha256=ffgcE3gaNlqLyCFUkzaMS9ZEz_NmE5PcsRPIK8H-EaM,776
3
+ fyrefly-0.1.0.dist-info/METADATA,sha256=2XIPKfC33YeyIdH21Peg5QfGRJd9ViJxPBZ50t-JSsQ,1625
4
+ fyrefly-0.1.0.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
5
+ fyrefly-0.1.0.dist-info/licenses/LICENSE,sha256=v2spsd7N1pKFFh2G8wGP_45iwe5S0DYiJzG4im8Rupc,1066
6
+ fyrefly-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Your Name
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.