vara-lib 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.
vara_lib-0.1.0/LICENCE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vara Prasad
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,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: vara-lib
3
+ Version: 0.1.0
4
+ Summary: A simple Python utility library
5
+ Author: Vara Prasad
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENCE
9
+ Dynamic: license-file
10
+
11
+ # vara_lib
12
+
13
+ A simple and lightweight Python utility library created by **Vara Prasad**.
14
+
15
+ `vara_lib` provides useful mathematical utilities with a simple and beginner-friendly API.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install vara-lib
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```python
26
+ import vara_lib
27
+
28
+ numbers = [1, 2, 3, 4, 5]
29
+
30
+ print(vara_lib.add(numbers))
31
+ print(vara_lib.product(numbers))
32
+ print(vara_lib.hcf(numbers))
33
+ print(vara_lib.lcm(numbers))
34
+ ```
35
+
36
+ ## Current Features
37
+
38
+ ### `add()`
39
+
40
+ Returns the sum of all numbers in a list.
41
+
42
+ ```python
43
+ import vara_lib
44
+
45
+ result = vara_lib.add([10, 20, 30])
46
+
47
+ print(result)
48
+ ```
49
+
50
+ Output:
51
+
52
+ ```text
53
+ 60
54
+ ```
55
+
56
+ ### `product()`
57
+
58
+ Returns the product of all numbers in a list.
59
+
60
+ ```python
61
+ import vara_lib
62
+
63
+ result = vara_lib.product([2, 3, 4])
64
+
65
+ print(result)
66
+ ```
67
+
68
+ Output:
69
+
70
+ ```text
71
+ 24
72
+ ```
73
+
74
+ ### `hcf()`
75
+
76
+ Returns the Highest Common Factor (HCF) of all numbers in a list.
77
+
78
+ ```python
79
+ import vara_lib
80
+
81
+ result = vara_lib.hcf([12, 18, 24])
82
+
83
+ print(result)
84
+ ```
85
+
86
+ Output:
87
+
88
+ ```text
89
+ 6
90
+ ```
91
+
92
+ ### `lcm()`
93
+
94
+ Returns the Least Common Multiple (LCM) of all numbers in a list.
95
+
96
+ ```python
97
+ import vara_lib
98
+
99
+ result = vara_lib.lcm([4, 6, 8])
100
+
101
+ print(result)
102
+ ```
103
+
104
+ Output:
105
+
106
+ ```text
107
+ 24
108
+ ```
109
+
110
+ ## Example
111
+
112
+ ```python
113
+ import vara_lib
114
+
115
+ numbers = [4, 6, 8]
116
+
117
+ print("Sum:", vara_lib.add(numbers))
118
+ print("Product:", vara_lib.product(numbers))
119
+ print("HCF:", vara_lib.hcf(numbers))
120
+ print("LCM:", vara_lib.lcm(numbers))
121
+ ```
122
+
123
+ Output:
124
+
125
+ ```text
126
+ Sum: 18
127
+ Product: 192
128
+ HCF: 2
129
+ LCM: 24
130
+ ```
131
+
132
+ ## Why vara_lib?
133
+
134
+ * Simple API
135
+ * Beginner friendly
136
+ * Lightweight
137
+ * Easy to use
138
+ * Open source
139
+ * More utilities will be added in future versions
140
+
141
+ ## Requirements
142
+
143
+ Python 3.10 or newer.
144
+
145
+ ## Project Status
146
+
147
+ `vara_lib` is currently under active development.
148
+
149
+ More mathematical and utility functions will be added in future releases.
150
+
151
+ ## Author
152
+
153
+ **Vara Prasad**
154
+
155
+ ## License
156
+
157
+ This project is licensed under the MIT License.
@@ -0,0 +1,147 @@
1
+ # vara_lib
2
+
3
+ A simple and lightweight Python utility library created by **Vara Prasad**.
4
+
5
+ `vara_lib` provides useful mathematical utilities with a simple and beginner-friendly API.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install vara-lib
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```python
16
+ import vara_lib
17
+
18
+ numbers = [1, 2, 3, 4, 5]
19
+
20
+ print(vara_lib.add(numbers))
21
+ print(vara_lib.product(numbers))
22
+ print(vara_lib.hcf(numbers))
23
+ print(vara_lib.lcm(numbers))
24
+ ```
25
+
26
+ ## Current Features
27
+
28
+ ### `add()`
29
+
30
+ Returns the sum of all numbers in a list.
31
+
32
+ ```python
33
+ import vara_lib
34
+
35
+ result = vara_lib.add([10, 20, 30])
36
+
37
+ print(result)
38
+ ```
39
+
40
+ Output:
41
+
42
+ ```text
43
+ 60
44
+ ```
45
+
46
+ ### `product()`
47
+
48
+ Returns the product of all numbers in a list.
49
+
50
+ ```python
51
+ import vara_lib
52
+
53
+ result = vara_lib.product([2, 3, 4])
54
+
55
+ print(result)
56
+ ```
57
+
58
+ Output:
59
+
60
+ ```text
61
+ 24
62
+ ```
63
+
64
+ ### `hcf()`
65
+
66
+ Returns the Highest Common Factor (HCF) of all numbers in a list.
67
+
68
+ ```python
69
+ import vara_lib
70
+
71
+ result = vara_lib.hcf([12, 18, 24])
72
+
73
+ print(result)
74
+ ```
75
+
76
+ Output:
77
+
78
+ ```text
79
+ 6
80
+ ```
81
+
82
+ ### `lcm()`
83
+
84
+ Returns the Least Common Multiple (LCM) of all numbers in a list.
85
+
86
+ ```python
87
+ import vara_lib
88
+
89
+ result = vara_lib.lcm([4, 6, 8])
90
+
91
+ print(result)
92
+ ```
93
+
94
+ Output:
95
+
96
+ ```text
97
+ 24
98
+ ```
99
+
100
+ ## Example
101
+
102
+ ```python
103
+ import vara_lib
104
+
105
+ numbers = [4, 6, 8]
106
+
107
+ print("Sum:", vara_lib.add(numbers))
108
+ print("Product:", vara_lib.product(numbers))
109
+ print("HCF:", vara_lib.hcf(numbers))
110
+ print("LCM:", vara_lib.lcm(numbers))
111
+ ```
112
+
113
+ Output:
114
+
115
+ ```text
116
+ Sum: 18
117
+ Product: 192
118
+ HCF: 2
119
+ LCM: 24
120
+ ```
121
+
122
+ ## Why vara_lib?
123
+
124
+ * Simple API
125
+ * Beginner friendly
126
+ * Lightweight
127
+ * Easy to use
128
+ * Open source
129
+ * More utilities will be added in future versions
130
+
131
+ ## Requirements
132
+
133
+ Python 3.10 or newer.
134
+
135
+ ## Project Status
136
+
137
+ `vara_lib` is currently under active development.
138
+
139
+ More mathematical and utility functions will be added in future releases.
140
+
141
+ ## Author
142
+
143
+ **Vara Prasad**
144
+
145
+ ## License
146
+
147
+ This project is licensed under the MIT License.
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "vara-lib"
7
+ version = "0.1.0"
8
+ description = "A simple Python utility library"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [
12
+ {name = "Vara Prasad"}
13
+ ]
14
+
15
+ [tool.setuptools.packages.find]
16
+ where = ["."]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
1
+ from vara_lib import add, product, hcf, lcm
2
+
3
+
4
+ def test_add():
5
+ assert add([1, 2, 3]) == 6
6
+
7
+
8
+ def test_product():
9
+ assert product([2, 3, 4]) == 24
10
+
11
+
12
+ def test_hcf():
13
+ assert hcf([12, 18, 24]) == 6
14
+
15
+
16
+ def test_lcm():
17
+ assert lcm([4, 6, 8]) == 24
@@ -0,0 +1,8 @@
1
+ import vara_lib
2
+
3
+
4
+ def test_package_import():
5
+ assert vara_lib.add([1, 2, 3]) == 6
6
+ assert vara_lib.product([1, 2, 3]) == 6
7
+ assert vara_lib.hcf([12, 18, 24]) == 6
8
+ assert vara_lib.lcm([4, 6, 8]) == 24
@@ -0,0 +1,2 @@
1
+ from .math import add,product,hcf,lcm
2
+
@@ -0,0 +1,26 @@
1
+ import math
2
+ def add(arr):
3
+ return sum(arr)
4
+
5
+ def product(arr):
6
+ result = 1
7
+
8
+ for num in arr:
9
+ result *= num
10
+
11
+ return result
12
+
13
+ def hcf(arr):
14
+ result = arr[0]
15
+
16
+ for num in arr[1:]:
17
+ result = math.gcd(result,num)
18
+ return result
19
+
20
+ def lcm(arr):
21
+ result = arr[0]
22
+
23
+ for num in arr[1:]:
24
+ result = math.lcm(result,num)
25
+
26
+ return result
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: vara-lib
3
+ Version: 0.1.0
4
+ Summary: A simple Python utility library
5
+ Author: Vara Prasad
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENCE
9
+ Dynamic: license-file
10
+
11
+ # vara_lib
12
+
13
+ A simple and lightweight Python utility library created by **Vara Prasad**.
14
+
15
+ `vara_lib` provides useful mathematical utilities with a simple and beginner-friendly API.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install vara-lib
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```python
26
+ import vara_lib
27
+
28
+ numbers = [1, 2, 3, 4, 5]
29
+
30
+ print(vara_lib.add(numbers))
31
+ print(vara_lib.product(numbers))
32
+ print(vara_lib.hcf(numbers))
33
+ print(vara_lib.lcm(numbers))
34
+ ```
35
+
36
+ ## Current Features
37
+
38
+ ### `add()`
39
+
40
+ Returns the sum of all numbers in a list.
41
+
42
+ ```python
43
+ import vara_lib
44
+
45
+ result = vara_lib.add([10, 20, 30])
46
+
47
+ print(result)
48
+ ```
49
+
50
+ Output:
51
+
52
+ ```text
53
+ 60
54
+ ```
55
+
56
+ ### `product()`
57
+
58
+ Returns the product of all numbers in a list.
59
+
60
+ ```python
61
+ import vara_lib
62
+
63
+ result = vara_lib.product([2, 3, 4])
64
+
65
+ print(result)
66
+ ```
67
+
68
+ Output:
69
+
70
+ ```text
71
+ 24
72
+ ```
73
+
74
+ ### `hcf()`
75
+
76
+ Returns the Highest Common Factor (HCF) of all numbers in a list.
77
+
78
+ ```python
79
+ import vara_lib
80
+
81
+ result = vara_lib.hcf([12, 18, 24])
82
+
83
+ print(result)
84
+ ```
85
+
86
+ Output:
87
+
88
+ ```text
89
+ 6
90
+ ```
91
+
92
+ ### `lcm()`
93
+
94
+ Returns the Least Common Multiple (LCM) of all numbers in a list.
95
+
96
+ ```python
97
+ import vara_lib
98
+
99
+ result = vara_lib.lcm([4, 6, 8])
100
+
101
+ print(result)
102
+ ```
103
+
104
+ Output:
105
+
106
+ ```text
107
+ 24
108
+ ```
109
+
110
+ ## Example
111
+
112
+ ```python
113
+ import vara_lib
114
+
115
+ numbers = [4, 6, 8]
116
+
117
+ print("Sum:", vara_lib.add(numbers))
118
+ print("Product:", vara_lib.product(numbers))
119
+ print("HCF:", vara_lib.hcf(numbers))
120
+ print("LCM:", vara_lib.lcm(numbers))
121
+ ```
122
+
123
+ Output:
124
+
125
+ ```text
126
+ Sum: 18
127
+ Product: 192
128
+ HCF: 2
129
+ LCM: 24
130
+ ```
131
+
132
+ ## Why vara_lib?
133
+
134
+ * Simple API
135
+ * Beginner friendly
136
+ * Lightweight
137
+ * Easy to use
138
+ * Open source
139
+ * More utilities will be added in future versions
140
+
141
+ ## Requirements
142
+
143
+ Python 3.10 or newer.
144
+
145
+ ## Project Status
146
+
147
+ `vara_lib` is currently under active development.
148
+
149
+ More mathematical and utility functions will be added in future releases.
150
+
151
+ ## Author
152
+
153
+ **Vara Prasad**
154
+
155
+ ## License
156
+
157
+ This project is licensed under the MIT License.
@@ -0,0 +1,11 @@
1
+ LICENCE
2
+ README.md
3
+ pyproject.toml
4
+ tests/test_math.py
5
+ tests/test_package.py
6
+ vara_lib/__init__.py
7
+ vara_lib/math.py
8
+ vara_lib.egg-info/PKG-INFO
9
+ vara_lib.egg-info/SOURCES.txt
10
+ vara_lib.egg-info/dependency_links.txt
11
+ vara_lib.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ dist
2
+ tests
3
+ vara_lib