netstat2df


Namenetstat2df JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/netstat2df
SummaryRetrieves and parses network statistics related to IPv4 TCP and UDP connection returns this information as a Pandas DataFrame
upload_time2023-09-13 15:30:56
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords netstat ipv4 tcp udp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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


```python
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())

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/netstat2df",
    "name": "netstat2df",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "netstat,ipv4,tcp,udp",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/63/71/9a2c2961d6fe605a285f73353cf93b605cb29c3a479b12820f5f22e3eb93/netstat2df-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Retrieves and parses network statistics related to IPv4 TCP and UDP connection returns this information as a Pandas DataFrame\r\n\r\n## Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n### pip install netstat2df\r\n\r\n\r\n```python\r\nRetrieve and parse network statistics related to IPv4 TCP and UDP connections.\r\n\r\nThis function uses the 'netstat' command-line utility to gather information about\r\nIPv4 TCP and UDP connections, including local and foreign addresses, ports, process\r\nIDs (PIDs), and executable names. It then processes and returns this information\r\nas a Pandas DataFrame.\r\n\r\nReturns:\r\n\tpd.DataFrame: A DataFrame containing the following columns:\r\n\t\t- 'aa_proto': Protocol type ('TCP' or 'UDP').\r\n\t\t- 'aa_local_address': Local IP address.\r\n\t\t- 'aa_local_port': Local port number.\r\n\t\t- 'aa_foreign_address': Foreign IP address.\r\n\t\t- 'aa_foreign_port': Foreign port number.\r\n\t\t- 'aa_pid': Process ID (PID) of the associated process.\r\n\t\t- 'aa_executable': Executable name of the associated process.\r\n\t\t- 'aa_status': Status of the connection (may be empty or NaN if unavailable).\r\n\r\nNote:\r\n\t- If any error occurs during the retrieval or parsing of network statistics,\r\n\t  the function returns an empty DataFrame.\r\n\r\nExample:\r\n\t>>> from netstat2df import get_netstat_ipv4_df\r\n\t>>> df = get_netstat_ipv4_df()\r\n\t>>> print(df.head())\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Retrieves and parses network statistics related to IPv4 TCP and UDP connection returns this information as a Pandas DataFrame",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/netstat2df"
    },
    "split_keywords": [
        "netstat",
        "ipv4",
        "tcp",
        "udp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1970b466bfab6560299d0ab00c4c8e5e589a56fa9a7dd5149ec134b0aec0080",
                "md5": "b491d4bccad56b82b91f24c72b35df26",
                "sha256": "1d6f4814945d28b77cccb13ae901f6b1642b43e2349d2fda28b8e8f666894620"
            },
            "downloads": -1,
            "filename": "netstat2df-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b491d4bccad56b82b91f24c72b35df26",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6145,
            "upload_time": "2023-09-13T15:30:54",
            "upload_time_iso_8601": "2023-09-13T15:30:54.695730Z",
            "url": "https://files.pythonhosted.org/packages/a1/97/0b466bfab6560299d0ab00c4c8e5e589a56fa9a7dd5149ec134b0aec0080/netstat2df-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63719a2c2961d6fe605a285f73353cf93b605cb29c3a479b12820f5f22e3eb93",
                "md5": "83ba77837d6bc4386023566c6723f340",
                "sha256": "d448dcfa947bd2aa7d33cc60cab7219a3934e963a927445bd2db9107c31e248b"
            },
            "downloads": -1,
            "filename": "netstat2df-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "83ba77837d6bc4386023566c6723f340",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4679,
            "upload_time": "2023-09-13T15:30:56",
            "upload_time_iso_8601": "2023-09-13T15:30:56.723465Z",
            "url": "https://files.pythonhosted.org/packages/63/71/9a2c2961d6fe605a285f73353cf93b605cb29c3a479b12820f5f22e3eb93/netstat2df-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-13 15:30:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "netstat2df",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "netstat2df"
}
        
Elapsed time: 0.11803s