gatenet
Gatenet is a Python toolkit for networking: diagnostics (ping, traceroute, DNS, ports), simple HTTP/TCP/UDP building blocks, service discovery, and Wi‑Fi hotspot management. It now includes a lightweight hooks system for easy extensibility.
Install
pip install gatenet
Python 3.10+ • Linux/macOS/Windows (feature availability varies by platform)
Highlights
- Diagnostics: ICMP/TCP ping, traceroute, port scan, DNS, IP geolocation
- HTTP/TCP/UDP: minimal server/client utilities
- Discovery: pluggable detectors with a registry
- Hotspot: create/manage Wi‑Fi access points (Linux/macOS)
- Hooks: shared event bus across modules (HTTP, clients, discovery, diagnostics)
Quick start
HTTP server
from gatenet.http_.server import HTTPServerComponent
server = HTTPServerComponent(host="127.0.0.1", port=8080)
@server.route("/status", method="GET")
def status(_req):
return {"ok": True}
server.start()
HTTP client
from gatenet.http_.client import HTTPClient
client = HTTPClient("http://127.0.0.1:8080")
res = client.get("/status")
print(res["data"]) # {"ok": True}
TCP / UDP
from gatenet.client.tcp import TCPClient
from gatenet.client.udp import UDPClient
# TCP
tcp = TCPClient("127.0.0.1", 9000)
tcp.connect()
print(tcp.send("ping"))
tcp.close()
# UDP
udp = UDPClient("127.0.0.1", 9001)
print(udp.send("ping"))
udp.close()
Diagnostics
from gatenet.diagnostics import ping
from gatenet.diagnostics.traceroute import traceroute
print(ping("1.1.1.1", count=2))
print(traceroute("example.com"))
Discovery
from gatenet.discovery.ssh import _identify_service
print(_identify_service(22, "SSH-2.0-OpenSSH_8.9p1"))
Hotspot (platform-dependent)
from gatenet.hotspot import Hotspot
hotspot = Hotspot(ssid="GatenetAP", password="SecurePass123!")
if hotspot.start():
print("running")
hotspot.stop()
Hooks & events
from gatenet.core import hooks, events
hooks.on(events.HTTP_BEFORE_REQUEST, lambda req: print("HTTP", req.command, req.path))
Learn more
- Docs: https://gatenet.readthedocs.io
- Examples: docs Examples page (HTTP, TCP/UDP, discovery, diagnostics, hooks)
- Changelog: https://gatenet.readthedocs.io/en/latest/changelog.html
Contributing
Run tests locally:
pytest -q
License: MIT
Metadata
Release files for gatenet 0.12.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gatenet-0.12.6.tar.gz | 59.9 kB | Without provenance | Details for gatenet-0.12.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gatenet-0.12.6-py3-none-any.whl | Python 3 | none | any | Details for gatenet-0.12.6-py3-none-any.whl |
Total release size: 82.1 kB
Release files / gatenet-0.12.6.tar.gz
| Download URL | gatenet-0.12.6.tar.gz |
|---|---|
| Size | 59.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db2e0a8620617e742b61b8b88df3e244a893258f41be3c638011012618970640
|
|
BLAKE2b-256 checksum How to use checksums |
520c086226f8fbd9447d616d4397d4a238f1a4925349ceba31ac98e08d4a9f02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / gatenet-0.12.6-py3-none-any.whl
| Download URL | gatenet-0.12.6-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
433965ea7c379ca4fb07d0c288f5fc5fe72382b75d0bf7dabc61a8bb7a628eea
|
|
BLAKE2b-256 checksum How to use checksums |
3c4cb583201a4cf44f2bb467835a77a7b213cf3d48d423b3f82cd730a4c5f6a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for gatenet 0.12.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.