# Parses the output from 'uiautomator events' in real time and converts it to a list of lists / pandas DataFrame.
## pip install adbeventparser
[![YT](https://i.ytimg.com/vi/KtO5h6XospU/maxresdefault.jpg)](https://www.youtube.com/watch?v=KtO5h6XospU)
[https://www.youtube.com/watch?v=KtO5h6XospU]()
```python
EventRecord class for recording events from an Android device using ADB.
This class provides a way to capture events from an Android device using ADB (Android Debug Bridge).
It can parse and display event data in both standard output and Pandas DataFrame formats.
Args:
adb_path (str): The path to the ADB executable.
device_serial (str): The serial number of the target Android device.
print_output (bool, optional): Whether to print event data to the console. Default is True.
print_output_pandas (bool, optional): Whether to print event data as Pandas DataFrames. Default is False.
convert_to_pandas (bool, optional): Whether to convert event data to Pandas DataFrames. Default is False.
parent1replacement (str, optional): A character used to replace temporarily opening square brackets '[' in event data. Default is "\x80".
parent2replacement (str, optional): A character used to replace temporarily closing square brackets ']' in event data. Default is "\x81".
Methods:
start_recording(**kwargs): Starts recording events from the device.
Attributes:
stop: Stops the event recording if True
results (list): A list of lists containing parsed event data.
resultsdf (list): A list of Pandas DataFrames containing parsed event data. (if installed)
Example usage
from adbeventparser import EventRecord
sua = EventRecord(
adb_path=r"C:\Android\android-sdk\platform-tools\adb.exe",
device_serial="127.0.0.1:5555",
print_output=True,
print_output_pandas=False,
convert_to_pandas=False,
parent1replacement="\x80",
parent2replacement="\x81",
)
sua.start_recording()
# to stop
# sua.stop=True
# the data as a list of lists
# sua.results
# the data as pandas (if installed)
# sua.resultsdf
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/adbeventparser",
"name": "adbeventparser",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "uiautomator,events,record,adb,android,robo",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/53/b2/a938130ad9b3f1a9148f1364c6bbfab590ad59287ae02c03460aaab22af4/adbeventparser-0.10.tar.gz",
"platform": null,
"description": "\r\n# Parses the output from 'uiautomator events' in real time and converts it to a list of lists / pandas DataFrame.\r\n\r\n\r\n## pip install adbeventparser\r\n\r\n\r\n[![YT](https://i.ytimg.com/vi/KtO5h6XospU/maxresdefault.jpg)](https://www.youtube.com/watch?v=KtO5h6XospU)\r\n[https://www.youtube.com/watch?v=KtO5h6XospU]()\r\n\r\n```python\r\nEventRecord class for recording events from an Android device using ADB.\r\n\r\nThis class provides a way to capture events from an Android device using ADB (Android Debug Bridge).\r\nIt can parse and display event data in both standard output and Pandas DataFrame formats.\r\n\r\nArgs:\r\n\tadb_path (str): The path to the ADB executable.\r\n\tdevice_serial (str): The serial number of the target Android device.\r\n\tprint_output (bool, optional): Whether to print event data to the console. Default is True.\r\n\tprint_output_pandas (bool, optional): Whether to print event data as Pandas DataFrames. Default is False.\r\n\tconvert_to_pandas (bool, optional): Whether to convert event data to Pandas DataFrames. Default is False.\r\n\tparent1replacement (str, optional): A character used to replace temporarily opening square brackets '[' in event data. Default is \"\\x80\".\r\n\tparent2replacement (str, optional): A character used to replace temporarily closing square brackets ']' in event data. Default is \"\\x81\".\r\n\r\nMethods:\r\n\tstart_recording(**kwargs): Starts recording events from the device.\r\n\r\nAttributes:\r\n\tstop: Stops the event recording if True\r\n\tresults (list): A list of lists containing parsed event data.\r\n\tresultsdf (list): A list of Pandas DataFrames containing parsed event data. (if installed)\r\n\r\nExample usage\r\n\tfrom adbeventparser import EventRecord\r\n\tsua = EventRecord(\r\n\t\tadb_path=r\"C:\\Android\\android-sdk\\platform-tools\\adb.exe\",\r\n\t\tdevice_serial=\"127.0.0.1:5555\",\r\n\t\tprint_output=True,\r\n\t\tprint_output_pandas=False,\r\n\t\tconvert_to_pandas=False,\r\n\t\tparent1replacement=\"\\x80\",\r\n\t\tparent2replacement=\"\\x81\",\r\n\t)\r\n\tsua.start_recording()\r\n\t# to stop\r\n\t# sua.stop=True\r\n\t# the data as a list of lists\r\n\t# sua.results\r\n\t# the data as pandas (if installed)\r\n\t# sua.resultsdf\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Parses the output from 'uiautomator events' in real time and converts it to a list of lists / pandas DataFrame.",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/adbeventparser"
},
"split_keywords": [
"uiautomator",
"events",
"record",
"adb",
"android",
"robo"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b68e3e4c5e6098c33b7e32f13eeeedcb63524a0e23ecc306a74e17c19e836ce2",
"md5": "72265371e6082ec06d9fb2cbfd416557",
"sha256": "140466733003ffe193295ce776f8c20b197483e2421c5168bb1a53ef0d63fd72"
},
"downloads": -1,
"filename": "adbeventparser-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72265371e6082ec06d9fb2cbfd416557",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10547,
"upload_time": "2023-11-04T12:26:17",
"upload_time_iso_8601": "2023-11-04T12:26:17.795777Z",
"url": "https://files.pythonhosted.org/packages/b6/8e/3e4c5e6098c33b7e32f13eeeedcb63524a0e23ecc306a74e17c19e836ce2/adbeventparser-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "53b2a938130ad9b3f1a9148f1364c6bbfab590ad59287ae02c03460aaab22af4",
"md5": "1544e767580ee0e57c6368c4b2355184",
"sha256": "f64228404e55854dc20234ccc86615c8793bb6db3e8dd2c8a0760bfe59107527"
},
"downloads": -1,
"filename": "adbeventparser-0.10.tar.gz",
"has_sig": false,
"md5_digest": "1544e767580ee0e57c6368c4b2355184",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9567,
"upload_time": "2023-11-04T12:26:19",
"upload_time_iso_8601": "2023-11-04T12:26:19.749864Z",
"url": "https://files.pythonhosted.org/packages/53/b2/a938130ad9b3f1a9148f1364c6bbfab590ad59287ae02c03460aaab22af4/adbeventparser-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-04 12:26:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "adbeventparser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "adbeventparser"
}