ssonal-pyutils 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,22 @@
1
+
2
+ MIT License
3
+
4
+ Copyright (c) 2026 Sonal Gupta
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: ssonal-pyutils
3
+ Version: 0.1.0
4
+ Summary: Python utilities for palindrome and Armstrong number checking
5
+ Author: Sonal Gupta
6
+ License-Expression: MIT
7
+ Keywords: python,palindrome,armstrong,utilities
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: license-file
16
+
17
+
18
+ # ssonal-pkg1
19
+
20
+ A lightweight Python package that provides simple utility functions to check whether a number or string is a palindrome and whether a number is an Armstrong number.
21
+
22
+ ## Features
23
+
24
+ - Check palindrome numbers.
25
+ - Check palindrome strings.
26
+ - Check Armstrong numbers.
27
+ - Lightweight and easy to use.
28
+ - No external dependencies.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install ssonal-pkg1
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ### 1. Check Palindrome
39
+
40
+ ```python
41
+ from ssonal_pkg1 import is_palindrome
42
+
43
+ print(is_palindrome(121))
44
+ # Output: True
45
+
46
+ print(is_palindrome("madam"))
47
+ # Output: True
48
+
49
+ print(is_palindrome(123))
50
+ # Output: False
51
+ ```
52
+
53
+ ### 2. Check Armstrong Number
54
+
55
+ ```python
56
+ from ssonal_pkg1 import is_armstrong
57
+
58
+ print(is_armstrong(153))
59
+ # Output: True
60
+
61
+ print(is_armstrong(370))
62
+ # Output: True
63
+
64
+ print(is_armstrong(123))
65
+ # Output: False
66
+ ```
67
+
68
+ ## Available Functions
69
+
70
+ | Function | Description |
71
+ |---|---|
72
+ | `is_palindrome(value)` | Checks whether a string or number is a palindrome. |
73
+ | `is_armstrong(number)` | Checks whether a number is an Armstrong number. |
74
+
75
+ ## Project Structure
76
+
77
+ ```text
78
+ ssonal_pkg1/
79
+ │
80
+ ├── ssonal_pkg1/
81
+ │ ├── __init__.py
82
+ │ ├── palindrome.py
83
+ │ └── armstrong.py
84
+ │
85
+ ├── README.md
86
+ ├── LICENSE
87
+ └── pyproject.toml
88
+ ```
89
+
90
+ ## Requirements
91
+
92
+ - Python 3.8 or above
93
+
94
+ ## Author
95
+
96
+ Sonal Gupta
97
+
98
+ ## License
99
+
100
+ This project is licensed under the MIT License.
@@ -0,0 +1,84 @@
1
+
2
+ # ssonal-pkg1
3
+
4
+ A lightweight Python package that provides simple utility functions to check whether a number or string is a palindrome and whether a number is an Armstrong number.
5
+
6
+ ## Features
7
+
8
+ - Check palindrome numbers.
9
+ - Check palindrome strings.
10
+ - Check Armstrong numbers.
11
+ - Lightweight and easy to use.
12
+ - No external dependencies.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pip install ssonal-pkg1
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ### 1. Check Palindrome
23
+
24
+ ```python
25
+ from ssonal_pkg1 import is_palindrome
26
+
27
+ print(is_palindrome(121))
28
+ # Output: True
29
+
30
+ print(is_palindrome("madam"))
31
+ # Output: True
32
+
33
+ print(is_palindrome(123))
34
+ # Output: False
35
+ ```
36
+
37
+ ### 2. Check Armstrong Number
38
+
39
+ ```python
40
+ from ssonal_pkg1 import is_armstrong
41
+
42
+ print(is_armstrong(153))
43
+ # Output: True
44
+
45
+ print(is_armstrong(370))
46
+ # Output: True
47
+
48
+ print(is_armstrong(123))
49
+ # Output: False
50
+ ```
51
+
52
+ ## Available Functions
53
+
54
+ | Function | Description |
55
+ |---|---|
56
+ | `is_palindrome(value)` | Checks whether a string or number is a palindrome. |
57
+ | `is_armstrong(number)` | Checks whether a number is an Armstrong number. |
58
+
59
+ ## Project Structure
60
+
61
+ ```text
62
+ ssonal_pkg1/
63
+ │
64
+ ├── ssonal_pkg1/
65
+ │ ├── __init__.py
66
+ │ ├── palindrome.py
67
+ │ └── armstrong.py
68
+ │
69
+ ├── README.md
70
+ ├── LICENSE
71
+ └── pyproject.toml
72
+ ```
73
+
74
+ ## Requirements
75
+
76
+ - Python 3.8 or above
77
+
78
+ ## Author
79
+
80
+ Sonal Gupta
81
+
82
+ ## License
83
+
84
+ This project is licensed under the MIT License.
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ssonal-pyutils"
7
+ version = "0.1.0"
8
+ description = "Python utilities for palindrome and Armstrong number checking"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "MIT"
12
+
13
+ authors = [
14
+ { name = "Sonal Gupta" }
15
+ ]
16
+
17
+ keywords = [
18
+ "python",
19
+ "palindrome",
20
+ "armstrong",
21
+ "utilities"
22
+ ]
23
+
24
+ classifiers = [
25
+ "Development Status :: 3 - Alpha",
26
+ "Intended Audience :: Developers",
27
+ "Programming Language :: Python :: 3",
28
+ "Operating System :: OS Independent"
29
+ ]
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["."]
33
+ include = ["usser_pkg*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: ssonal-pyutils
3
+ Version: 0.1.0
4
+ Summary: Python utilities for palindrome and Armstrong number checking
5
+ Author: Sonal Gupta
6
+ License-Expression: MIT
7
+ Keywords: python,palindrome,armstrong,utilities
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: license-file
16
+
17
+
18
+ # ssonal-pkg1
19
+
20
+ A lightweight Python package that provides simple utility functions to check whether a number or string is a palindrome and whether a number is an Armstrong number.
21
+
22
+ ## Features
23
+
24
+ - Check palindrome numbers.
25
+ - Check palindrome strings.
26
+ - Check Armstrong numbers.
27
+ - Lightweight and easy to use.
28
+ - No external dependencies.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install ssonal-pkg1
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ### 1. Check Palindrome
39
+
40
+ ```python
41
+ from ssonal_pkg1 import is_palindrome
42
+
43
+ print(is_palindrome(121))
44
+ # Output: True
45
+
46
+ print(is_palindrome("madam"))
47
+ # Output: True
48
+
49
+ print(is_palindrome(123))
50
+ # Output: False
51
+ ```
52
+
53
+ ### 2. Check Armstrong Number
54
+
55
+ ```python
56
+ from ssonal_pkg1 import is_armstrong
57
+
58
+ print(is_armstrong(153))
59
+ # Output: True
60
+
61
+ print(is_armstrong(370))
62
+ # Output: True
63
+
64
+ print(is_armstrong(123))
65
+ # Output: False
66
+ ```
67
+
68
+ ## Available Functions
69
+
70
+ | Function | Description |
71
+ |---|---|
72
+ | `is_palindrome(value)` | Checks whether a string or number is a palindrome. |
73
+ | `is_armstrong(number)` | Checks whether a number is an Armstrong number. |
74
+
75
+ ## Project Structure
76
+
77
+ ```text
78
+ ssonal_pkg1/
79
+ │
80
+ ├── ssonal_pkg1/
81
+ │ ├── __init__.py
82
+ │ ├── palindrome.py
83
+ │ └── armstrong.py
84
+ │
85
+ ├── README.md
86
+ ├── LICENSE
87
+ └── pyproject.toml
88
+ ```
89
+
90
+ ## Requirements
91
+
92
+ - Python 3.8 or above
93
+
94
+ ## Author
95
+
96
+ Sonal Gupta
97
+
98
+ ## License
99
+
100
+ This project is licensed under the MIT License.
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ ssonal_pyutils.egg-info/PKG-INFO
5
+ ssonal_pyutils.egg-info/SOURCES.txt
6
+ ssonal_pyutils.egg-info/dependency_links.txt
7
+ ssonal_pyutils.egg-info/top_level.txt
8
+ usser_pkg/armstrong.py
9
+ usser_pkg/init.py
10
+ usser_pkg/palindrome.py
@@ -0,0 +1,12 @@
1
+
2
+ def is_armstrong(number):
3
+ """Check whether a number is an Armstrong number."""
4
+ if not isinstance(number, int) or number < 0:
5
+ return False
6
+
7
+ digits = str(number)
8
+ power = len(digits)
9
+
10
+ total = sum(int(digit) ** power for digit in digits)
11
+
12
+ return total == number
@@ -0,0 +1,10 @@
1
+
2
+ from .palindrome import is_palindrome
3
+ from .armstrong import is_armstrong
4
+
5
+ __version__ = "0.1.0"
6
+
7
+ __all__ = [
8
+ "is_palindrome",
9
+ "is_armstrong"
10
+ ]
@@ -0,0 +1,5 @@
1
+
2
+ def is_palindrome(value):
3
+ """Check whether a number or string is a palindrome."""
4
+ value = str(value).lower().replace(" ", "")
5
+ return value == value[::-1]