pwb 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.

Potentially problematic release.


This version of pwb might be problematic. Click here for more details.

pwb-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.4
2
+ Name: pwb
3
+ Version: 0.1.0
4
+ Summary: Peering Workbench — consolidated ASN, WHOIS, PeeringDB, RPKI, IRR, DNS, and Looking Glass desktop tool for network engineers
5
+ Author: speterman
6
+ License: GPLv3
7
+ Project-URL: Homepage, https://github.com/scottpeterman/pwb
8
+ Project-URL: Issues, https://github.com/scottpeterman/pwb/issues
9
+ Project-URL: Changelog, https://github.com/scottpeterman/pwb/blob/main/CHANGELOG.md
10
+ Keywords: bgp,peering,asn,whois,peeringdb,looking-glass,network,noc,rdap,ripestat,rpki,irr,dns
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: X11 Applications :: Qt
13
+ Classifier: Environment :: MacOS X
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Intended Audience :: Telecommunications Industry
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: System :: Networking
25
+ Classifier: Topic :: System :: Networking :: Monitoring
26
+ Requires-Python: >=3.10
27
+ Description-Content-Type: text/markdown
28
+ Requires-Dist: PyQt6>=6.5
29
+ Requires-Dist: requests>=2.31
30
+ Provides-Extra: cymru
31
+ Requires-Dist: dnspython>=2.4; extra == "cymru"
32
+ Provides-Extra: dev
33
+ Requires-Dist: build; extra == "dev"
34
+ Requires-Dist: twine; extra == "dev"
35
+ Requires-Dist: ruff; extra == "dev"
36
+
37
+ # ⚡ pwb — Peering Workbench
38
+
39
+ A consolidated desktop tool for network engineers who are tired of juggling browser tabs between PeeringDB, WHOIS, looking glass sites, and RPKI validators. One app, one search bar, every lookup you need.
40
+
41
+ Built with PyQt6. All APIs are free and require no keys.
42
+
43
+ ![PyPI](https://img.shields.io/pypi/v/pwb)
44
+ ![Python](https://img.shields.io/pypi/pyversions/pwb)
45
+ ![License](https://img.shields.io/pypi/l/pwb)
46
+
47
+ ---
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ pip install pwb
53
+ ```
54
+
55
+ For Team Cymru IP→ASN lookups and the DNS Lookup tab (recommended):
56
+
57
+ ```bash
58
+ pip install pwb[cymru]
59
+ ```
60
+
61
+ ## Launch
62
+
63
+ ```bash
64
+ python -m pwb
65
+ ```
66
+
67
+ Or if installed via pip:
68
+
69
+ ```bash
70
+ peering-workbench
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Features
76
+
77
+ ### ⚡ Quick Lookup Bar
78
+
79
+ The toolbar input auto-detects what you type and routes to the right tab:
80
+
81
+ | Input | Detected as | Tab |
82
+ |---|---|---|
83
+ | `15169` or `AS15169` | ASN | ASN Lookup |
84
+ | `8.8.8.8` | IPv4 address | IP Lookup |
85
+ | `2607:f8b0:4001::1` | IPv6 address | IP Lookup |
86
+ | `1.0.0.0/24` or `2620:129::/44` | Prefix (v4/v6) | Prefix / LG |
87
+ | `cloudflare.com` | Hostname | DNS Lookup |
88
+
89
+ One search bar for everything. No mode switching, no tab hunting.
90
+
91
+ ### 🏷 ASN Lookup
92
+
93
+ Enter any ASN — pulls **PeeringDB**, **RIPEstat**, and **RDAP** simultaneously in background threads. Sub-tabs for each data source plus raw JSON. One-click "Open in HE" jumps to the embedded HE tab for that ASN.
94
+
95
+ - IX presence with port speeds
96
+ - Facility list with cities
97
+ - Peering policy, NOC/policy email contacts
98
+ - Announced prefixes, upstream/downstream neighbors
99
+ - WHOIS registration, abuse contacts
100
+
101
+ ![ASN / PeeringDB Lookup](screenshots/peeringdb.png)
102
+
103
+ ### 🌍 IP Lookup
104
+
105
+ Full context for any IPv4 or IPv6 address in a single view:
106
+
107
+ - **Team Cymru** DNS-based IP→ASN mapping with resolved network name (IPv4 and IPv6)
108
+ - **RDAP** network allocation and CIDR blocks
109
+ - **RIPEstat** geolocation, abuse contacts, prefix info
110
+ - **RPKI validation** — automatically derives the covering prefix and origin ASN, then checks ROA validity inline. You see whether the prefix is RPKI-valid without leaving the tab.
111
+ - **One-click prefix drill-down** — click the "Full Prefix Lookup" link to jump to the Prefix tab with the covering prefix pre-filled, launching the full lookup (RPKI, IRR, looking glass, related prefixes) in one click.
112
+
113
+ ![IP Lookup](screenshots/iplookup.png)
114
+
115
+ ### 📡 Prefix / Looking Glass
116
+
117
+ Query any IPv4 or IPv6 prefix for routing status, origin AS, related/covering prefixes, and **RIPEstat looking glass** data from 25+ RIPE RRC route collectors worldwide — with **resolved AS-path names**.
118
+
119
+ ```
120
+ 8218 (Zayo-IPX) → 6461 (Zayo) → 174 (Cogent) → 6169 (Kentik)
121
+ ```
122
+
123
+ Every ASN in every AS path is automatically resolved via PeeringDB and cached to disk. First lookup resolves names in the background; subsequent lookups render instantly from cache.
124
+
125
+ #### RPKI Validation
126
+
127
+ Each origin ASN is checked against the RPKI via RIPEstat's Routinator-backed validator. Results are color-coded:
128
+
129
+ - 🟢 **Valid** — a ROA exists and matches the prefix/origin/maxLength
130
+ - 🟡 **Not Found** — no ROA covers this prefix (RPKI-unknown)
131
+ - 🔴 **Invalid** — a ROA exists but the origin or prefix length doesn't match
132
+
133
+ Matching ROAs are displayed with their origin, prefix, and maxLength so you can immediately spot maxLength mismatches — the most common "everything looks right but traffic is dropping" RPKI issue.
134
+
135
+ #### IRR Route Object Consistency
136
+
137
+ Shows whether route/route6 objects exist in the IRR for the prefix, which registries they're in, and whether they match what's actually announced in BGP:
138
+
139
+ - **BGP + IRR ✓** — announced and registered (healthy)
140
+ - **BGP only — no IRR ✗** — announced but no route object (peers filtering on IRR will drop it)
141
+ - **IRR only — not announced** — registered but not in the BGP table (stale object)
142
+
143
+ This surfaces the kind of mismatch where RPKI is valid but a peer's IRR-based filters silently reject the prefix.
144
+
145
+ ![Prefix / Looking Glass with RPKI and IRR](screenshots/lookingglass.png)
146
+
147
+ ### 🔎 DNS Lookup
148
+
149
+ General-purpose DNS record lookup powered by `dnspython`. Enter any hostname to query all record types at once, or select a specific type from the dropdown:
150
+
151
+ - **A / AAAA** — IPv4 and IPv6 addresses
152
+ - **CNAME** — canonical name aliases
153
+ - **MX** — mail exchangers with preference values
154
+ - **NS** — authoritative nameservers
155
+ - **TXT** — SPF, DKIM, verification records
156
+ - **SOA** — zone authority (serial, refresh, retry, expire)
157
+ - **PTR** — reverse DNS (auto-detected when you enter an IP instead of a hostname)
158
+ - **CAA** — certificate authority authorization
159
+
160
+ Enter an IP address and it automatically performs a reverse PTR lookup instead. Useful for identifying router hostnames from traceroute output.
161
+
162
+ ### 💾 ASN Name Cache
163
+
164
+ Persistent disk cache at `~/.peering_workbench/asn_cache.json`. Grows automatically as you use the tool — after a few prefix lookups you'll have the entire tier-1/tier-2 transit universe cached. The file is portable: back it up, sync across machines, or seed it from other sources.
165
+
166
+ ---
167
+
168
+ ## APIs Used
169
+
170
+ All free, no API keys required.
171
+
172
+ | Source | What it provides |
173
+ |--------|-----------------|
174
+ | [PeeringDB](https://www.peeringdb.com/api/) | Network info, IX connections, facilities, peering policy, contacts |
175
+ | [RIPEstat](https://stat.ripe.net/data/) | ASN overview, announced prefixes, neighbors, looking glass (RRCs), RPKI validation, IRR routing consistency |
176
+ | [RDAP](https://rdap.org/) | Structured WHOIS replacement (auto-routes to ARIN/RIPE/APNIC) |
177
+ | [Team Cymru](https://www.team-cymru.com/ip-asn-mapping) | DNS-based IP→ASN mapping for IPv4 and IPv6 (requires `dnspython`) |
178
+
179
+ ## Requirements
180
+
181
+ - Python 3.10+
182
+ - PyQt6
183
+ - requests
184
+ - dnspython (optional but recommended — enables Team Cymru lookups and the DNS Lookup tab)
185
+
186
+ ## Development
187
+
188
+ ```bash
189
+ git clone https://github.com/speterman/pwb.git
190
+ cd pwb
191
+ python -m venv .venv
192
+ source .venv/bin/activate
193
+ pip install -e ".[dev,cymru]"
194
+ python -m pwb
195
+ ```
196
+
197
+ ## Publishing
198
+
199
+ ```bash
200
+ python -m build
201
+ twine upload dist/*
202
+ ```
203
+
204
+ ## License
205
+
206
+ GPLv3 — see [LICENSE](LICENSE).
pwb-0.1.0/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # ⚡ pwb — Peering Workbench
2
+
3
+ A consolidated desktop tool for network engineers who are tired of juggling browser tabs between PeeringDB, WHOIS, looking glass sites, and RPKI validators. One app, one search bar, every lookup you need.
4
+
5
+ Built with PyQt6. All APIs are free and require no keys.
6
+
7
+ ![PyPI](https://img.shields.io/pypi/v/pwb)
8
+ ![Python](https://img.shields.io/pypi/pyversions/pwb)
9
+ ![License](https://img.shields.io/pypi/l/pwb)
10
+
11
+ ---
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pip install pwb
17
+ ```
18
+
19
+ For Team Cymru IP→ASN lookups and the DNS Lookup tab (recommended):
20
+
21
+ ```bash
22
+ pip install pwb[cymru]
23
+ ```
24
+
25
+ ## Launch
26
+
27
+ ```bash
28
+ python -m pwb
29
+ ```
30
+
31
+ Or if installed via pip:
32
+
33
+ ```bash
34
+ peering-workbench
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Features
40
+
41
+ ### ⚡ Quick Lookup Bar
42
+
43
+ The toolbar input auto-detects what you type and routes to the right tab:
44
+
45
+ | Input | Detected as | Tab |
46
+ |---|---|---|
47
+ | `15169` or `AS15169` | ASN | ASN Lookup |
48
+ | `8.8.8.8` | IPv4 address | IP Lookup |
49
+ | `2607:f8b0:4001::1` | IPv6 address | IP Lookup |
50
+ | `1.0.0.0/24` or `2620:129::/44` | Prefix (v4/v6) | Prefix / LG |
51
+ | `cloudflare.com` | Hostname | DNS Lookup |
52
+
53
+ One search bar for everything. No mode switching, no tab hunting.
54
+
55
+ ### 🏷 ASN Lookup
56
+
57
+ Enter any ASN — pulls **PeeringDB**, **RIPEstat**, and **RDAP** simultaneously in background threads. Sub-tabs for each data source plus raw JSON. One-click "Open in HE" jumps to the embedded HE tab for that ASN.
58
+
59
+ - IX presence with port speeds
60
+ - Facility list with cities
61
+ - Peering policy, NOC/policy email contacts
62
+ - Announced prefixes, upstream/downstream neighbors
63
+ - WHOIS registration, abuse contacts
64
+
65
+ ![ASN / PeeringDB Lookup](screenshots/peeringdb.png)
66
+
67
+ ### 🌍 IP Lookup
68
+
69
+ Full context for any IPv4 or IPv6 address in a single view:
70
+
71
+ - **Team Cymru** DNS-based IP→ASN mapping with resolved network name (IPv4 and IPv6)
72
+ - **RDAP** network allocation and CIDR blocks
73
+ - **RIPEstat** geolocation, abuse contacts, prefix info
74
+ - **RPKI validation** — automatically derives the covering prefix and origin ASN, then checks ROA validity inline. You see whether the prefix is RPKI-valid without leaving the tab.
75
+ - **One-click prefix drill-down** — click the "Full Prefix Lookup" link to jump to the Prefix tab with the covering prefix pre-filled, launching the full lookup (RPKI, IRR, looking glass, related prefixes) in one click.
76
+
77
+ ![IP Lookup](screenshots/iplookup.png)
78
+
79
+ ### 📡 Prefix / Looking Glass
80
+
81
+ Query any IPv4 or IPv6 prefix for routing status, origin AS, related/covering prefixes, and **RIPEstat looking glass** data from 25+ RIPE RRC route collectors worldwide — with **resolved AS-path names**.
82
+
83
+ ```
84
+ 8218 (Zayo-IPX) → 6461 (Zayo) → 174 (Cogent) → 6169 (Kentik)
85
+ ```
86
+
87
+ Every ASN in every AS path is automatically resolved via PeeringDB and cached to disk. First lookup resolves names in the background; subsequent lookups render instantly from cache.
88
+
89
+ #### RPKI Validation
90
+
91
+ Each origin ASN is checked against the RPKI via RIPEstat's Routinator-backed validator. Results are color-coded:
92
+
93
+ - 🟢 **Valid** — a ROA exists and matches the prefix/origin/maxLength
94
+ - 🟡 **Not Found** — no ROA covers this prefix (RPKI-unknown)
95
+ - 🔴 **Invalid** — a ROA exists but the origin or prefix length doesn't match
96
+
97
+ Matching ROAs are displayed with their origin, prefix, and maxLength so you can immediately spot maxLength mismatches — the most common "everything looks right but traffic is dropping" RPKI issue.
98
+
99
+ #### IRR Route Object Consistency
100
+
101
+ Shows whether route/route6 objects exist in the IRR for the prefix, which registries they're in, and whether they match what's actually announced in BGP:
102
+
103
+ - **BGP + IRR ✓** — announced and registered (healthy)
104
+ - **BGP only — no IRR ✗** — announced but no route object (peers filtering on IRR will drop it)
105
+ - **IRR only — not announced** — registered but not in the BGP table (stale object)
106
+
107
+ This surfaces the kind of mismatch where RPKI is valid but a peer's IRR-based filters silently reject the prefix.
108
+
109
+ ![Prefix / Looking Glass with RPKI and IRR](screenshots/lookingglass.png)
110
+
111
+ ### 🔎 DNS Lookup
112
+
113
+ General-purpose DNS record lookup powered by `dnspython`. Enter any hostname to query all record types at once, or select a specific type from the dropdown:
114
+
115
+ - **A / AAAA** — IPv4 and IPv6 addresses
116
+ - **CNAME** — canonical name aliases
117
+ - **MX** — mail exchangers with preference values
118
+ - **NS** — authoritative nameservers
119
+ - **TXT** — SPF, DKIM, verification records
120
+ - **SOA** — zone authority (serial, refresh, retry, expire)
121
+ - **PTR** — reverse DNS (auto-detected when you enter an IP instead of a hostname)
122
+ - **CAA** — certificate authority authorization
123
+
124
+ Enter an IP address and it automatically performs a reverse PTR lookup instead. Useful for identifying router hostnames from traceroute output.
125
+
126
+ ### 💾 ASN Name Cache
127
+
128
+ Persistent disk cache at `~/.peering_workbench/asn_cache.json`. Grows automatically as you use the tool — after a few prefix lookups you'll have the entire tier-1/tier-2 transit universe cached. The file is portable: back it up, sync across machines, or seed it from other sources.
129
+
130
+ ---
131
+
132
+ ## APIs Used
133
+
134
+ All free, no API keys required.
135
+
136
+ | Source | What it provides |
137
+ |--------|-----------------|
138
+ | [PeeringDB](https://www.peeringdb.com/api/) | Network info, IX connections, facilities, peering policy, contacts |
139
+ | [RIPEstat](https://stat.ripe.net/data/) | ASN overview, announced prefixes, neighbors, looking glass (RRCs), RPKI validation, IRR routing consistency |
140
+ | [RDAP](https://rdap.org/) | Structured WHOIS replacement (auto-routes to ARIN/RIPE/APNIC) |
141
+ | [Team Cymru](https://www.team-cymru.com/ip-asn-mapping) | DNS-based IP→ASN mapping for IPv4 and IPv6 (requires `dnspython`) |
142
+
143
+ ## Requirements
144
+
145
+ - Python 3.10+
146
+ - PyQt6
147
+ - requests
148
+ - dnspython (optional but recommended — enables Team Cymru lookups and the DNS Lookup tab)
149
+
150
+ ## Development
151
+
152
+ ```bash
153
+ git clone https://github.com/speterman/pwb.git
154
+ cd pwb
155
+ python -m venv .venv
156
+ source .venv/bin/activate
157
+ pip install -e ".[dev,cymru]"
158
+ python -m pwb
159
+ ```
160
+
161
+ ## Publishing
162
+
163
+ ```bash
164
+ python -m build
165
+ twine upload dist/*
166
+ ```
167
+
168
+ ## License
169
+
170
+ GPLv3 — see [LICENSE](LICENSE).
@@ -0,0 +1,24 @@
1
+ """
2
+ pwb — Peering Workbench
3
+
4
+ Consolidated ASN / WHOIS / PeeringDB / Looking Glass desktop tool
5
+ for network engineers. Built with PyQt6 + WebEngine.
6
+
7
+ Usage:
8
+ python -m pwb # launch the GUI
9
+ peering-workbench # if installed via pip
10
+
11
+ APIs used (all free, no keys required):
12
+ • PeeringDB — https://www.peeringdb.com/api/
13
+ • RIPEstat — https://stat.ripe.net/data/
14
+ • RDAP — https://rdap.org/ (auto-routes to ARIN/RIPE/APNIC)
15
+ • Team Cymru — DNS-based IP→ASN mapping (requires dnspython)
16
+ • HE BGP — Embedded bgp.he.net via WebEngine
17
+ """
18
+
19
+ __version__ = "0.1.0"
20
+ __author__ = "speterman"
21
+
22
+ from .workbench import main
23
+
24
+ __all__ = ["main", "__version__"]
@@ -0,0 +1,4 @@
1
+ """Allow running as: python -m pwb"""
2
+ from .workbench import main
3
+
4
+ main()