networking-utils 0.1.1__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.
- networking_utils-0.1.1/LICENSE +21 -0
- networking_utils-0.1.1/PKG-INFO +62 -0
- networking_utils-0.1.1/README.md +36 -0
- networking_utils-0.1.1/pyproject.toml +42 -0
- networking_utils-0.1.1/setup.cfg +4 -0
- networking_utils-0.1.1/src/networking_utils/__init__.py +9 -0
- networking_utils-0.1.1/src/networking_utils/cli.py +25 -0
- networking_utils-0.1.1/src/networking_utils/math_utils.py +24 -0
- networking_utils-0.1.1/src/networking_utils.egg-info/PKG-INFO +62 -0
- networking_utils-0.1.1/src/networking_utils.egg-info/SOURCES.txt +13 -0
- networking_utils-0.1.1/src/networking_utils.egg-info/dependency_links.txt +1 -0
- networking_utils-0.1.1/src/networking_utils.egg-info/entry_points.txt +2 -0
- networking_utils-0.1.1/src/networking_utils.egg-info/requires.txt +3 -0
- networking_utils-0.1.1/src/networking_utils.egg-info/top_level.txt +1 -0
- networking_utils-0.1.1/tests/test_math_utils.py +7 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 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.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: networking-utils
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: A small collection of networking-related utility helpers (demo).
|
|
5
|
+
Author-email: Your Name <you@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://example.com/networking-utils
|
|
8
|
+
Project-URL: Repository, https://example.com/networking-utils/repo
|
|
9
|
+
Project-URL: Issues, https://example.com/networking-utils/issues
|
|
10
|
+
Keywords: networking,utilities,demo
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest<9.0,>=7.0; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# networking-utils
|
|
28
|
+
|
|
29
|
+
A tiny demonstration Python package showing project structure for PyPI publishing. Provides a simple `add_two_number` function (placeholder for more networking-focused utilities you might add later).
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
- `add_two_number(a, b)`: adds two numbers with type hints.
|
|
33
|
+
- Ready-to-publish project scaffold using PEP 621 metadata in `pyproject.toml`.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
```bash
|
|
37
|
+
pip install networking-utils
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
```python
|
|
42
|
+
from networking_utils import add_two_number
|
|
43
|
+
print(add_two_number(2, 3)) # 5
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
CLI entry point (after installation):
|
|
47
|
+
```bash
|
|
48
|
+
networking-utils-add 2 3
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
```bash
|
|
53
|
+
python -m venv .venv
|
|
54
|
+
. .venv/bin/activate # Windows PowerShell: .venv\\Scripts\\Activate.ps1
|
|
55
|
+
pip install -e .[dev]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Versioning
|
|
59
|
+
Semantic versioning (MAJOR.MINOR.PATCH).
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
MIT
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# networking-utils
|
|
2
|
+
|
|
3
|
+
A tiny demonstration Python package showing project structure for PyPI publishing. Provides a simple `add_two_number` function (placeholder for more networking-focused utilities you might add later).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
- `add_two_number(a, b)`: adds two numbers with type hints.
|
|
7
|
+
- Ready-to-publish project scaffold using PEP 621 metadata in `pyproject.toml`.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
```bash
|
|
11
|
+
pip install networking-utils
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
```python
|
|
16
|
+
from networking_utils import add_two_number
|
|
17
|
+
print(add_two_number(2, 3)) # 5
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
CLI entry point (after installation):
|
|
21
|
+
```bash
|
|
22
|
+
networking-utils-add 2 3
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
```bash
|
|
27
|
+
python -m venv .venv
|
|
28
|
+
. .venv/bin/activate # Windows PowerShell: .venv\\Scripts\\Activate.ps1
|
|
29
|
+
pip install -e .[dev]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Versioning
|
|
33
|
+
Semantic versioning (MAJOR.MINOR.PATCH).
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
MIT
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "networking-utils"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "A small collection of networking-related utility helpers (demo)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "Your Name", email = "you@example.com"}
|
|
12
|
+
]
|
|
13
|
+
license = {text = "MIT"}
|
|
14
|
+
requires-python = ">=3.8"
|
|
15
|
+
keywords = ["networking", "utilities", "demo"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
+
"Programming Language :: Python :: 3.8",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"License :: OSI Approved :: MIT License",
|
|
25
|
+
"Operating System :: OS Independent",
|
|
26
|
+
]
|
|
27
|
+
dependencies = []
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
dev = ["pytest>=7.0,<9.0"]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://example.com/networking-utils"
|
|
34
|
+
Repository = "https://example.com/networking-utils/repo"
|
|
35
|
+
Issues = "https://example.com/networking-utils/issues"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
where = ["src"]
|
|
39
|
+
include = ["networking_utils*"]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
networking-utils-add = "networking_utils.cli:main"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Command line entry point for networking_utils.
|
|
2
|
+
|
|
3
|
+
Installed as the console script `networking-utils-add`.
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import argparse
|
|
8
|
+
from typing import Iterable, Optional
|
|
9
|
+
from .math_utils import add_two_number
|
|
10
|
+
|
|
11
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
12
|
+
p = argparse.ArgumentParser(description="Add two numbers and print the result.")
|
|
13
|
+
p.add_argument("a", type=float, help="First number")
|
|
14
|
+
p.add_argument("b", type=float, help="Second number")
|
|
15
|
+
return p
|
|
16
|
+
|
|
17
|
+
def main(argv: Optional[Iterable[str]] = None) -> int:
|
|
18
|
+
parser = build_parser()
|
|
19
|
+
args = parser.parse_args(list(argv) if argv is not None else None)
|
|
20
|
+
result = add_two_number(args.a, args.b)
|
|
21
|
+
print(result)
|
|
22
|
+
return 0
|
|
23
|
+
|
|
24
|
+
if __name__ == "__main__": # pragma: no cover
|
|
25
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Math utility functions for networking_utils.
|
|
2
|
+
|
|
3
|
+
Currently contains a simple add_two_number function, with type hints and a small self-test.
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Union
|
|
8
|
+
|
|
9
|
+
Number = Union[int, float]
|
|
10
|
+
|
|
11
|
+
def add_two_number(a: Number, b: Number) -> Number:
|
|
12
|
+
"""Return the sum of two numbers.
|
|
13
|
+
|
|
14
|
+
Examples
|
|
15
|
+
--------
|
|
16
|
+
>>> add_two_number(2, 3)
|
|
17
|
+
5
|
|
18
|
+
>>> add_two_number(2.5, 0.5)
|
|
19
|
+
3.0
|
|
20
|
+
"""
|
|
21
|
+
return a + b
|
|
22
|
+
|
|
23
|
+
if __name__ == "__main__": # pragma: no cover
|
|
24
|
+
print("Self-test: add_two_number(2, 3) ->", add_two_number(2, 3))
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: networking-utils
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: A small collection of networking-related utility helpers (demo).
|
|
5
|
+
Author-email: Your Name <you@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://example.com/networking-utils
|
|
8
|
+
Project-URL: Repository, https://example.com/networking-utils/repo
|
|
9
|
+
Project-URL: Issues, https://example.com/networking-utils/issues
|
|
10
|
+
Keywords: networking,utilities,demo
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest<9.0,>=7.0; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# networking-utils
|
|
28
|
+
|
|
29
|
+
A tiny demonstration Python package showing project structure for PyPI publishing. Provides a simple `add_two_number` function (placeholder for more networking-focused utilities you might add later).
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
- `add_two_number(a, b)`: adds two numbers with type hints.
|
|
33
|
+
- Ready-to-publish project scaffold using PEP 621 metadata in `pyproject.toml`.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
```bash
|
|
37
|
+
pip install networking-utils
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
```python
|
|
42
|
+
from networking_utils import add_two_number
|
|
43
|
+
print(add_two_number(2, 3)) # 5
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
CLI entry point (after installation):
|
|
47
|
+
```bash
|
|
48
|
+
networking-utils-add 2 3
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
```bash
|
|
53
|
+
python -m venv .venv
|
|
54
|
+
. .venv/bin/activate # Windows PowerShell: .venv\\Scripts\\Activate.ps1
|
|
55
|
+
pip install -e .[dev]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Versioning
|
|
59
|
+
Semantic versioning (MAJOR.MINOR.PATCH).
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/networking_utils/__init__.py
|
|
5
|
+
src/networking_utils/cli.py
|
|
6
|
+
src/networking_utils/math_utils.py
|
|
7
|
+
src/networking_utils.egg-info/PKG-INFO
|
|
8
|
+
src/networking_utils.egg-info/SOURCES.txt
|
|
9
|
+
src/networking_utils.egg-info/dependency_links.txt
|
|
10
|
+
src/networking_utils.egg-info/entry_points.txt
|
|
11
|
+
src/networking_utils.egg-info/requires.txt
|
|
12
|
+
src/networking_utils.egg-info/top_level.txt
|
|
13
|
+
tests/test_math_utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
networking_utils
|