Windows network and system snapshot collector
Project description
NetState
NetState is a Python package for collecting structured system and network information on Windows machines.
It provides a clean API to retrieve:
- Operating system details
- Active private network adapter information
- Public IP and ISP information
- JSON-serializable network snapshots
This package is intended to be used as a library, not a standalone application.
Installation
After publishing to PyPI:
pip install netstate
For local development:
pip install -e .
Basic Usage
from netstate.network_info import get_network_info
snapshot = get_network_info()
print(snapshot.system)
print(snapshot.private_network)
print(snapshot.public_network)
JSON Output
from netstate.network_info import get_network_info_json
json_output = get_network_info_json()
print(json_output)
Returned Data Structure
get_network_info() returns a NetStateSnapshot dataclass containing:
- platform (str)
- system (SystemData)
- private_network (List[NetworkData] | None)
- public_network (PublicNetworkData | None)
- record_time (datetime)
All models are defined using Python dataclasses.
Requirements
- Python 3.9+
- Windows OS
- requests
Design Goals
- Clean modular architecture
- Structured dataclass models
- Graceful failure handling
- Easy JSON serialization
- Extensible collector design
License
MIT License
Author
Imon Mallik
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netstate-0.1.0.tar.gz.
File metadata
- Download URL: netstate-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24b6d3de0ad63cac7845a6d33dce1dff10cb958dc6d908fbddbcab9b628ed924
|
|
| MD5 |
39225fe4fdbc3d9c8d3a5786123aac55
|
|
| BLAKE2b-256 |
5dc796c4bbe41e02d847d04ca8124660d84086a778bd0b45ea9037cfde8891b1
|
File details
Details for the file netstate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: netstate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e41df17198e5af8d23ce8ac7541599ae726929e83ace2bad0c85967ab10cc17
|
|
| MD5 |
de3158bd8079e27dc2090afdccf52a2c
|
|
| BLAKE2b-256 |
5e9eb9eb889a5c782386cc0aec0be363d4a4e826090a5cd3160357fa68be8c0a
|