testhellos 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.
testhellos/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ from .math_utils import add, subtract, multiply, divide
2
+
3
+ from .string_utils import (
4
+ reverse_string,
5
+ count_words,
6
+ capitalize_words
7
+ )
8
+
9
+ __version__ = "0.1.0"
@@ -0,0 +1,22 @@
1
+ def add(a, b):
2
+ """Return the sum of two numbers."""
3
+ return a + b
4
+
5
+
6
+ def subtract(a, b):
7
+ """Return the difference between two numbers."""
8
+ return a - b
9
+
10
+
11
+ def multiply(a, b):
12
+ """Return the product of two numbers."""
13
+ return a * b
14
+
15
+
16
+ def divide(a, b):
17
+ """Divide two numbers."""
18
+
19
+ if b == 0:
20
+ raise ValueError("Cannot divide by zero")
21
+
22
+ return a / b
@@ -0,0 +1,13 @@
1
+ def reverse_string(text):
2
+ """Reverse a string."""
3
+ return text[::-1]
4
+
5
+
6
+ def count_words(text):
7
+ """Count words in a string."""
8
+ return len(text.split())
9
+
10
+
11
+ def capitalize_words(text):
12
+ """Capitalize each word."""
13
+ return text.title()
@@ -0,0 +1,249 @@
1
+ Metadata-Version: 2.4
2
+ Name: testhellos
3
+ Version: 0.1.0
4
+ Summary: A collection of reusable Python utilities
5
+ Author: Adarsh Kumar
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+
12
+ # TestHellos
13
+
14
+ **A lightweight collection of reusable Python utilities for everyday development.**
15
+
16
+ TestHellos is a Python package designed to provide simple, reusable helper functions for mathematical operations and string manipulation.
17
+
18
+ Whether you're building a small script or a larger Python application, TestHellos helps you avoid rewriting common utility functions.
19
+
20
+ ---
21
+
22
+ ## Features
23
+
24
+ - Simple mathematical operations.
25
+ - String reversal.
26
+ - Word counting.
27
+ - Word capitalization.
28
+ - Lightweight and easy to use.
29
+ - No external runtime dependencies.
30
+ - Easy integration into Python projects.
31
+
32
+ ---
33
+
34
+ ## Installation
35
+
36
+ Install TestHellos using pip:
37
+
38
+ ```bash
39
+ pip install testhellos
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Quick Start
45
+
46
+ ```python
47
+ from testhellos import add, subtract, multiply, divide
48
+ from testhellos import reverse_string, count_words, capitalize_words
49
+
50
+ # Mathematical operations
51
+ print(add(10, 20)) # 30
52
+ print(subtract(20, 10)) # 10
53
+ print(multiply(5, 5)) # 25
54
+ print(divide(20, 4)) # 5.0
55
+
56
+ # String operations
57
+ print(reverse_string("Python")) # nohtyP
58
+ print(count_words("Hello Python")) # 2
59
+ print(capitalize_words("hello world")) # Hello World
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Available Functions
65
+
66
+ ### Mathematical Utilities
67
+
68
+ ```python
69
+ from testhellos import add, subtract, multiply, divide
70
+ ```
71
+
72
+ | Function | Description |
73
+ |---|---|
74
+ | `add(a, b)` | Adds two numbers |
75
+ | `subtract(a, b)` | Subtracts two numbers |
76
+ | `multiply(a, b)` | Multiplies two numbers |
77
+ | `divide(a, b)` | Divides two numbers |
78
+
79
+ Example:
80
+
81
+ ```python
82
+ print(add(10, 5)) # 15
83
+ print(subtract(10, 5)) # 5
84
+ print(multiply(10, 5)) # 50
85
+ print(divide(10, 5)) # 2.0
86
+ ```
87
+
88
+ Note: `divide()` raises a `ValueError` when the divisor is zero.
89
+
90
+ ### String Utilities
91
+
92
+ ```python
93
+ from testhellos import reverse_string, count_words, capitalize_words
94
+ ```
95
+
96
+ | Function | Description |
97
+ |---|---|
98
+ | `reverse_string(text)` | Reverses a string |
99
+ | `count_words(text)` | Counts words in a string |
100
+ | `capitalize_words(text)` | Capitalizes each word |
101
+
102
+ Example:
103
+
104
+ ```python
105
+ print(reverse_string("Hello")) # olleH
106
+ print(count_words("Python is awesome")) # 3
107
+ print(capitalize_words("hello world")) # Hello World
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Project Structure
113
+
114
+ ```text
115
+ testhellos/
116
+ │
117
+ ├── dist/
118
+ │ ├── testhellos-0.1.0-py3-none-any.whl
119
+ │ └── testhellos-0.1.0.tar.gz
120
+ │
121
+ ├── src/
122
+ │ └── testhellos/
123
+ │ ├── __init__.py
124
+ │ ├── math_utils.py
125
+ │ └── string_utils.py
126
+ │
127
+ ├── tests/
128
+ │ └── test_math_utils.py
129
+ │
130
+ ├── pyproject.toml
131
+ ├── README.md
132
+ └── LICENSE
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Development Setup
138
+
139
+ Clone the repository:
140
+
141
+ ```bash
142
+ git clone https://github.com/YOUR_USERNAME/testhellos.git
143
+ cd testhellos
144
+ ```
145
+
146
+ Create a virtual environment:
147
+
148
+ ```bash
149
+ python -m venv venv
150
+ ```
151
+
152
+ Activate it:
153
+
154
+ **Linux / macOS**
155
+
156
+ ```bash
157
+ source venv/bin/activate
158
+ ```
159
+
160
+ **Windows**
161
+
162
+ ```powershell
163
+ venv\Scripts\activate
164
+ ```
165
+
166
+ Install development tools:
167
+
168
+ ```bash
169
+ python -m pip install --upgrade pip
170
+ python -m pip install build twine pytest
171
+ ```
172
+
173
+ Install the package in editable mode:
174
+
175
+ ```bash
176
+ python -m pip install -e .
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Running Tests
182
+
183
+ ```bash
184
+ pytest
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Building the Package
190
+
191
+ ```bash
192
+ python -m build
193
+ ```
194
+
195
+ Validate the generated distributions:
196
+
197
+ ```bash
198
+ python -m twine check dist/*
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Publishing to PyPI
204
+
205
+ Upload to TestPyPI:
206
+
207
+ ```bash
208
+ python -m twine upload --repository testpypi dist/*
209
+ ```
210
+
211
+ After testing, publish to the official PyPI:
212
+
213
+ ```bash
214
+ python -m twine upload dist/*
215
+ ```
216
+
217
+ Never commit your API tokens or credentials to GitHub.
218
+
219
+ ---
220
+
221
+ ## Requirements
222
+
223
+ - Python 3.9 or newer.
224
+ - pip.
225
+ - No third-party runtime dependencies.
226
+
227
+ ---
228
+
229
+ ## License
230
+
231
+ This project is licensed under the MIT License.
232
+
233
+ See the [LICENSE](LICENSE) file for details.
234
+
235
+ ---
236
+
237
+ ## Contributing
238
+
239
+ Contributions, suggestions, and bug reports are welcome.
240
+
241
+ 1. Fork the repository.
242
+ 2. Create a feature branch.
243
+ 3. Make your changes.
244
+ 4. Add or update tests.
245
+ 5. Submit a pull request.
246
+
247
+ ---
248
+
249
+ **TestHellos — Small utilities, simpler Python development.**
@@ -0,0 +1,7 @@
1
+ testhellos/__init__.py,sha256=UY0iCWzEKMdg7wg2aE5E5a_ugNzm1SJQ2qt_EptH6vs,167
2
+ testhellos/math_utils.py,sha256=o5gr-8BOUKaE8Gtq9l0BpOwMDmuORWFPms_MQu-jUq8,382
3
+ testhellos/string_utils.py,sha256=AHA7N0b4ic22YbsRIpJ7Kv-Vr_xK7kBL2mTxptyWMW4,250
4
+ testhellos-0.1.0.dist-info/METADATA,sha256=r9j9VGgsDGvOuEROKNBnR-2taC4r6N8NpIRMNsL8sH0,4356
5
+ testhellos-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
6
+ testhellos-0.1.0.dist-info/top_level.txt,sha256=DJs5Oq-kwXfWNjUG5asFwDKJGjmf465B_pcnGX1pU1c,11
7
+ testhellos-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
+ testhellos