Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netstate-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netstate-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for netstate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 24b6d3de0ad63cac7845a6d33dce1dff10cb958dc6d908fbddbcab9b628ed924
MD5 39225fe4fdbc3d9c8d3a5786123aac55
BLAKE2b-256 5dc796c4bbe41e02d847d04ca8124660d84086a778bd0b45ea9037cfde8891b1

See more details on using hashes here.

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

Hashes for netstate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e41df17198e5af8d23ce8ac7541599ae726929e83ace2bad0c85967ab10cc17
MD5 de3158bd8079e27dc2090afdccf52a2c
BLAKE2b-256 5e9eb9eb889a5c782386cc0aec0be363d4a4e826090a5cd3160357fa68be8c0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page