Skip to main content

Gets various network diagnostics for a pc

Project description

py-net-diags

A Python package for network diagnostics that collects various metrics about your machine's network connection.

Installation

Basic Installation

pip install py-net-diags

With Optional speedcheck Support

pip install py-net-diags[speedcheck]

Configuration

Environment Variables

Create a .env file based on the provided .env-sample:

# ConnectWise API Configuration
RUNNING_IN_ASIO=true/false    # Set to true if running in ASIO environment
CW_BASE_URL=your_cw_url       # ConnectWise base URL
AUTHORIZATION=your_auth_token # ConnectWise authorization token
CLIENTID=your_client_id       # ConnectWise client ID

# Retry Configuration
RETRY_ATTEMPTS=3              # Number of retry attempts for operations
RETRY_DELAY=2                 # Delay in seconds between retry attempts

Input Configuration

Create an input.json file to specify endpoints to scan:

{
  "Endpoints_1744302956989": "cloudflare.com,10.0.0.1",
  "ticket_id": "12345"        # Optional: ConnectWise ticket ID
}

You can add any number of comma-separated endpoints to scan.

Usage Examples

from py_net_diags.network_diagnostics import NetworkDiagnostics

# Initialize the diagnostics tool
diag = NetworkDiagnostics()

# Run all diagnostics
results = diag.run_diagnostics()
print(results)

# Save the results to a file (txt, json, pdf)
diag.save_results_as_txt("/path/to/output.txt")
diag.save_results_as_json("/path/to/output.json")
diag.save_results_as_pdf("/path/to/output.pdf")

Conda Environment Setup

Basic Environment

name: net-diags
channels:
  - defaults
  - conda-forge
dependencies:
  - python=3.11
  - pip
  - pip:
    - py-net-diags

With speedcheck Support

name: net-diags-full
channels:
  - defaults
  - conda-forge
dependencies:
  - python=3.11
  - pip
  - pip:
    - "py-net-diags[speedcheck]"

Save either of these as environment.yml and create the environment with:

conda env create -f environment.yml

License

MIT

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

py_net_diags-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

py_net_diags-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file py_net_diags-0.1.0.tar.gz.

File metadata

  • Download URL: py_net_diags-0.1.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for py_net_diags-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40f77f26a5a8a044ee347f560706334594fbad0b8569ad4b21690802bc3bf222
MD5 91028d5ac4ab9637117df6c3f511a731
BLAKE2b-256 31828af5906b1694bb52ce57af9d875d2ee02fae9dfda84058fda09366567cd4

See more details on using hashes here.

File details

Details for the file py_net_diags-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_net_diags-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for py_net_diags-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf35c7ba2dbbef6d3175281fa3ce63eb0b1465ab37758897a7cd64c8e9e95667
MD5 ffaedc58eaa1856c49791e9d9386af71
BLAKE2b-256 90fc241cf1ea9a47f3aa950debe6a5dea6b6be9f83e6d46252416e19998d38ce

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