netshow 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.
@@ -0,0 +1,66 @@
1
+ # .github/workflows/python-app.yml
2
+ # CI pipeline for NetShow:
3
+ # * installs dependencies via pip (extras: dev)
4
+ # * checks formatting (Black), linting (Ruff), typing (mypy)
5
+ # * runs unit tests (pytest) on all supported Python versions
6
+
7
+ name: Python application
8
+
9
+ on:
10
+ push:
11
+ branches: ["main"]
12
+ pull_request:
13
+ branches: ["main"]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ build:
20
+ name: Test on Python ${{ matrix.python-version }}
21
+ runs-on: ubuntu-latest
22
+
23
+ strategy:
24
+ matrix:
25
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
26
+
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: "${{ matrix.python-version }}"
34
+
35
+ - name: Cache pip
36
+ uses: actions/cache@v4
37
+ with:
38
+ path: ~/.cache/pip
39
+ key: >-
40
+ ${{ runner.os }}-py${{ matrix.python-version }}-
41
+ ${{ hashFiles('pyproject.toml') }}
42
+ restore-keys: |
43
+ ${{ runner.os }}-py${{ matrix.python-version }}-
44
+
45
+ - name: Install dependencies
46
+ run: |
47
+ python -m pip install --upgrade pip
48
+ pip install ".[dev]"
49
+
50
+ # ---------- QUALITY GATES ----------
51
+ - name: Check formatting with Black
52
+ run: |
53
+ black --check .
54
+
55
+ - name: Lint with Ruff
56
+ run: |
57
+ ruff check .
58
+
59
+ - name: Type-check with mypy
60
+ run: |
61
+ mypy src/
62
+
63
+ # ---------- TEST SUITE ----------
64
+ - name: Run tests with pytest
65
+ run: |
66
+ pytest -q
@@ -0,0 +1,96 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ .Python
8
+ build/
9
+ develop-eggs/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ lib/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+
24
+ # PyInstaller
25
+ *.manifest
26
+ *.spec
27
+
28
+ # Unit test / coverage reports
29
+ htmlcov/
30
+ .tox/
31
+ .coverage
32
+ .coverage.*
33
+ .cache
34
+ nosetests.xml
35
+ coverage.xml
36
+ *.cover
37
+ .hypothesis/
38
+ .pytest_cache/
39
+
40
+ # Translations
41
+ *.mo
42
+ *.pot
43
+
44
+ # Django stuff:
45
+ *.log
46
+ local_settings.py
47
+ db.sqlite3
48
+
49
+ # Flask stuff:
50
+ instance/
51
+ .webassets-cache
52
+
53
+ # Scrapy stuff:
54
+ .scrapy
55
+
56
+ # Sphinx documentation
57
+ docs/_build/
58
+
59
+ # PyBuilder
60
+ target/
61
+
62
+ # Jupyter Notebook
63
+ .ipynb_checkpoints
64
+
65
+ # pyenv
66
+ .python-version
67
+
68
+ # celery beat schedule file
69
+ celerybeat-schedule
70
+
71
+ # SageMath parsed files
72
+ *.sage.py
73
+
74
+ # Environments
75
+ .env
76
+ .venv
77
+ env/
78
+ venv/
79
+ ENV/
80
+ env.bak/
81
+ venv.bak/
82
+
83
+ # Spyder project settings
84
+ .spyderproject
85
+ .spyproject
86
+
87
+ # Rope project settings
88
+ .ropeproject
89
+
90
+ # mkdocs documentation
91
+ /site
92
+
93
+ # mypy
94
+ .mypy_cache/
95
+ .dmypy.json
96
+ dmypy.json
netshow-0.1.1/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ (base) ➜ reddacted git:(main) ✗ cat LICENSE
2
+ MIT License
3
+
4
+ Copyright (c) 2025 Taylor Wilsdon
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.
netshow-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: netshow
3
+ Version: 0.1.1
4
+ Summary: A real-time network connection monitor with friendly service names
5
+ Author: Taylor Wilsdon
6
+ License: MIT
7
+ License-File: LICENSE
8
+ Keywords: connections,monitoring,network,tui
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: System :: Monitoring
21
+ Classifier: Topic :: System :: Networking :: Monitoring
22
+ Requires-Python: >=3.9
23
+ Requires-Dist: psutil>=5.9.0
24
+ Requires-Dist: textual>=0.40.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: black>=23.0.0; extra == 'dev'
27
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
28
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
30
+ Requires-Dist: types-psutil>=5.9.0; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ <h1 align="center">🚦 NetShow</h1>
34
+ <p align="center"><em>Friendly, process-aware network monitoring for your terminal</em></p>
35
+
36
+ <p align="center">
37
+ <img src="https://img.shields.io/badge/python-3.9%2B-blue?logo=python&logoColor=white" alt="Python versions">
38
+ <img src="https://img.shields.io/github/license/taylorwilsdon/netshow?color=green" alt="License">
39
+ <img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey" alt="Platform">
40
+ <img src="https://img.shields.io/badge/code%20style-ruff-black?logo=ruff" alt="Code style: ruff">
41
+ <img src="https://img.shields.io/badge/UI-Textual-purple" alt="Built with Textual">
42
+ <img src="https://img.shields.io/badge/dependencies-uv-orange?logo=uv" alt="uv">
43
+ </p>
44
+
45
+ <div align="center">
46
+ <video width="1012px" src="https://github.com/user-attachments/assets/97f5af92-ec0a-4243-9894-d0c9d9470e1a"></video>
47
+ </div>
48
+
49
+ ---
50
+
51
+ <details>
52
+ <summary><strong>Table&nbsp;of&nbsp;Contents</strong></summary>
53
+
54
+ - [Features](#features)
55
+ - [Quickstart](#quickstart)
56
+ - [Usage](#usage)
57
+ - [Keybindings](#keybindings)
58
+ - [Development](#development)
59
+ - [Requirements](#requirements)
60
+ - [Contributing](#contributing)
61
+ - [License](#license)
62
+ </details>
63
+
64
+ ---
65
+
66
+ ## ✨ Features
67
+
68
+ | Capability | Details |
69
+ |------------|---------|
70
+ | **Live TCP monitor** | Refreshes every 3 s (configurable) while preserving scroll position |
71
+ | **Human-friendly service names** | Shows *Docker*, *Plex*, *VS Code*, etc. instead of cryptic binaries |
72
+ | **Deep process drill-down** | Path, PID, cmdline, cwd, threads, CPU %, memory %, open files, active connections |
73
+ | **Clickable / keyboard navigation** | Press `↵` or click a row for a dedicated detail screen; refresh pauses automatically |
74
+ | **Runs privileged <br>or unprivileged** | Uses `psutil` (root) for full fidelity, falls back to `lsof` if run as a regular user |
75
+ | **Modern Textual UI** | Smooth scrolling, dark theme, status bar with connection count & data source |
76
+ | **Zero-pain install** | Powered by [`uv`](https://github.com/astral-sh/uv) for lightning-fast dependency resolution |
77
+
78
+ ---
79
+
80
+ ## 🚀 Quickstart
81
+
82
+ ```bash
83
+ # Install (recommended)
84
+ uv pip install netshow
85
+
86
+ # Run
87
+ netshow
88
+ ````
89
+
90
+ > **Tip:** Without root/sudo, NetShow silently switches to `lsof` and still gives you most connections.
91
+
92
+ ---
93
+
94
+ ## 🛠️ Usage
95
+
96
+ ```bash
97
+ netshow [--interval 1.0] [--no-colors]
98
+ ```
99
+
100
+ | Option | Description | Default |
101
+ | ------------------ | -------------------- | ------- |
102
+ | `--interval <sec>` | Refresh rate (float) | `3.0` |
103
+ | `--no-colors` | Disable ANSI colors | Off |
104
+
105
+ ### Keybindings
106
+
107
+ | Key / Mouse | Action |
108
+ | ----------- | ---------------- |
109
+ | ↑ / ↓ | Move cursor |
110
+ | ↵ / Click | Open detail view |
111
+ | Esc / ← | Back to list |
112
+ | **q** | Quit NetShow |
113
+
114
+ ---
115
+
116
+ ## 👩‍💻 Development
117
+
118
+ ```bash
119
+ git clone https://github.com/taylorwilsdon/netshow.git
120
+ cd netshow
121
+ uv sync --extra dev
122
+ ```
123
+
124
+ ### Quality Gates
125
+
126
+ ```bash
127
+ pytest # tests
128
+ ruff format . # auto-format
129
+ ruff check . # lint
130
+ mypy src/ # type check
131
+ ```
132
+
133
+ ---
134
+
135
+ ## 📋 Requirements
136
+
137
+ * Python **≥ 3.9**
138
+ * macOS or Linux
139
+ * `lsof` (usually pre-installed)
140
+
141
+ ---
142
+
143
+ ## 🤝 Contributing
144
+
145
+ Pull requests and ⭐ stars are welcome! Found a bug or have a feature request? Please [open an issue](https://github.com/taylorwilsdon/netshow/issues).
146
+
147
+ ---
148
+
149
+ ## 📜 License
150
+
151
+ MIT – see [`LICENSE`](LICENSE) for full text.
152
+
@@ -0,0 +1,120 @@
1
+ <h1 align="center">🚦 NetShow</h1>
2
+ <p align="center"><em>Friendly, process-aware network monitoring for your terminal</em></p>
3
+
4
+ <p align="center">
5
+ <img src="https://img.shields.io/badge/python-3.9%2B-blue?logo=python&logoColor=white" alt="Python versions">
6
+ <img src="https://img.shields.io/github/license/taylorwilsdon/netshow?color=green" alt="License">
7
+ <img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey" alt="Platform">
8
+ <img src="https://img.shields.io/badge/code%20style-ruff-black?logo=ruff" alt="Code style: ruff">
9
+ <img src="https://img.shields.io/badge/UI-Textual-purple" alt="Built with Textual">
10
+ <img src="https://img.shields.io/badge/dependencies-uv-orange?logo=uv" alt="uv">
11
+ </p>
12
+
13
+ <div align="center">
14
+ <video width="1012px" src="https://github.com/user-attachments/assets/97f5af92-ec0a-4243-9894-d0c9d9470e1a"></video>
15
+ </div>
16
+
17
+ ---
18
+
19
+ <details>
20
+ <summary><strong>Table&nbsp;of&nbsp;Contents</strong></summary>
21
+
22
+ - [Features](#features)
23
+ - [Quickstart](#quickstart)
24
+ - [Usage](#usage)
25
+ - [Keybindings](#keybindings)
26
+ - [Development](#development)
27
+ - [Requirements](#requirements)
28
+ - [Contributing](#contributing)
29
+ - [License](#license)
30
+ </details>
31
+
32
+ ---
33
+
34
+ ## ✨ Features
35
+
36
+ | Capability | Details |
37
+ |------------|---------|
38
+ | **Live TCP monitor** | Refreshes every 3 s (configurable) while preserving scroll position |
39
+ | **Human-friendly service names** | Shows *Docker*, *Plex*, *VS Code*, etc. instead of cryptic binaries |
40
+ | **Deep process drill-down** | Path, PID, cmdline, cwd, threads, CPU %, memory %, open files, active connections |
41
+ | **Clickable / keyboard navigation** | Press `↵` or click a row for a dedicated detail screen; refresh pauses automatically |
42
+ | **Runs privileged <br>or unprivileged** | Uses `psutil` (root) for full fidelity, falls back to `lsof` if run as a regular user |
43
+ | **Modern Textual UI** | Smooth scrolling, dark theme, status bar with connection count & data source |
44
+ | **Zero-pain install** | Powered by [`uv`](https://github.com/astral-sh/uv) for lightning-fast dependency resolution |
45
+
46
+ ---
47
+
48
+ ## 🚀 Quickstart
49
+
50
+ ```bash
51
+ # Install (recommended)
52
+ uv pip install netshow
53
+
54
+ # Run
55
+ netshow
56
+ ````
57
+
58
+ > **Tip:** Without root/sudo, NetShow silently switches to `lsof` and still gives you most connections.
59
+
60
+ ---
61
+
62
+ ## 🛠️ Usage
63
+
64
+ ```bash
65
+ netshow [--interval 1.0] [--no-colors]
66
+ ```
67
+
68
+ | Option | Description | Default |
69
+ | ------------------ | -------------------- | ------- |
70
+ | `--interval <sec>` | Refresh rate (float) | `3.0` |
71
+ | `--no-colors` | Disable ANSI colors | Off |
72
+
73
+ ### Keybindings
74
+
75
+ | Key / Mouse | Action |
76
+ | ----------- | ---------------- |
77
+ | ↑ / ↓ | Move cursor |
78
+ | ↵ / Click | Open detail view |
79
+ | Esc / ← | Back to list |
80
+ | **q** | Quit NetShow |
81
+
82
+ ---
83
+
84
+ ## 👩‍💻 Development
85
+
86
+ ```bash
87
+ git clone https://github.com/taylorwilsdon/netshow.git
88
+ cd netshow
89
+ uv sync --extra dev
90
+ ```
91
+
92
+ ### Quality Gates
93
+
94
+ ```bash
95
+ pytest # tests
96
+ ruff format . # auto-format
97
+ ruff check . # lint
98
+ mypy src/ # type check
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 📋 Requirements
104
+
105
+ * Python **≥ 3.9**
106
+ * macOS or Linux
107
+ * `lsof` (usually pre-installed)
108
+
109
+ ---
110
+
111
+ ## 🤝 Contributing
112
+
113
+ Pull requests and ⭐ stars are welcome! Found a bug or have a feature request? Please [open an issue](https://github.com/taylorwilsdon/netshow/issues).
114
+
115
+ ---
116
+
117
+ ## 📜 License
118
+
119
+ MIT – see [`LICENSE`](LICENSE) for full text.
120
+
@@ -0,0 +1,96 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "netshow"
7
+ version = "0.1.1"
8
+ description = "A real-time network connection monitor with friendly service names"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Taylor Wilsdon"},
14
+ ]
15
+ keywords = ["network", "monitoring", "tui", "connections"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "Intended Audience :: System Administrators",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Topic :: System :: Monitoring",
29
+ "Topic :: System :: Networking :: Monitoring",
30
+ ]
31
+
32
+ dependencies = [
33
+ "textual>=0.40.0",
34
+ "psutil>=5.9.0",
35
+ ]
36
+
37
+ [project.scripts]
38
+ netshow = "netshow.cli:main"
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest>=7.0.0",
43
+ "ruff>=0.1.0",
44
+ "mypy>=1.0.0",
45
+ "black>=23.0.0",
46
+ "types-psutil>=5.9.0",
47
+ ]
48
+
49
+ [tool.uv]
50
+ python-preference = "system"
51
+
52
+ [tool.ruff]
53
+ line-length = 100
54
+ target-version = "py39"
55
+
56
+ [tool.ruff.lint]
57
+ select = [
58
+ "E", # pycodestyle errors
59
+ "W", # pycodestyle warnings
60
+ "F", # pyflakes
61
+ "I", # isort
62
+ "B", # flake8-bugbear
63
+ "C4", # flake8-comprehensions
64
+ "UP", # pyupgrade
65
+ ]
66
+ ignore = []
67
+
68
+ [tool.ruff.format]
69
+ quote-style = "double"
70
+ indent-style = "space"
71
+
72
+ [tool.mypy]
73
+ python_version = "3.9"
74
+ warn_return_any = true
75
+ warn_unused_configs = true
76
+ disallow_untyped_defs = true
77
+ disallow_incomplete_defs = true
78
+ check_untyped_defs = true
79
+ disallow_untyped_decorators = true
80
+ no_implicit_optional = true
81
+ warn_redundant_casts = true
82
+ warn_unused_ignores = true
83
+ warn_no_return = true
84
+ warn_unreachable = true
85
+ strict_equality = true
86
+
87
+ [tool.pytest.ini_options]
88
+ testpaths = ["tests"]
89
+ python_files = ["test_*.py"]
90
+ python_classes = ["Test*"]
91
+ python_functions = ["test_*"]
92
+
93
+ [dependency-groups]
94
+ dev = [
95
+ "types-psutil>=7.0.0.20250601",
96
+ ]