Retrieves and parses network statistics related to IPv4 TCP and UDP connection returns this information as a Pandas DataFrame
Tested against Windows 10 / Python 3.10 / Anaconda
pip install netstat2df
Retrieve and parse network statistics related to IPv4 TCP and UDP connections.
This function uses the 'netstat' command-line utility to gather information about
IPv4 TCP and UDP connections, including local and foreign addresses, ports, process
IDs (PIDs), and executable names. It then processes and returns this information
as a Pandas DataFrame.
Returns:
pd.DataFrame: A DataFrame containing the following columns:
- 'aa_proto': Protocol type ('TCP' or 'UDP').
- 'aa_local_address': Local IP address.
- 'aa_local_port': Local port number.
- 'aa_foreign_address': Foreign IP address.
- 'aa_foreign_port': Foreign port number.
- 'aa_pid': Process ID (PID) of the associated process.
- 'aa_executable': Executable name of the associated process.
- 'aa_status': Status of the connection (may be empty or NaN if unavailable).
Note:
- If any error occurs during the retrieval or parsing of network statistics,
the function returns an empty DataFrame.
Example:
>>> from netstat2df import get_netstat_ipv4_df
>>> df = get_netstat_ipv4_df()
>>> print(df.head())
Metadata
Release files for netstat2df 0.10
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 |
|---|---|---|---|---|
| netstat2df-0.10.tar.gz | 4.7 kB | Without provenance | Details for netstat2df-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netstat2df-0.10-py3-none-any.whl | Python 3 | none | any | Details for netstat2df-0.10-py3-none-any.whl |
Total release size: 10.8 kB
Release files / netstat2df-0.10.tar.gz
| Download URL | netstat2df-0.10.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d448dcfa947bd2aa7d33cc60cab7219a3934e963a927445bd2db9107c31e248b
|
|
BLAKE2b-256 checksum How to use checksums |
63719a2c2961d6fe605a285f73353cf93b605cb29c3a479b12820f5f22e3eb93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / netstat2df-0.10-py3-none-any.whl
| Download URL | netstat2df-0.10-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d6f4814945d28b77cccb13ae901f6b1642b43e2349d2fda28b8e8f666894620
|
|
BLAKE2b-256 checksum How to use checksums |
a1970b466bfab6560299d0ab00c4c8e5e589a56fa9a7dd5149ec134b0aec0080
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for netstat2df 0.10
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.