**thoughtful** is a collection of open-source libraries and tools for Robot Process
Automation (RPA) development. The goal of this project is to provide a set of
for supervising bot execution, and enabling these bots to do more.
[![PyPi version](https://badgen.net/pypi/v/thoughtful/)](https://pypi.org/project/thoughtful/)
[![Supported Versions](https://img.shields.io/pypi/pyversions/thoughtful.svg)](https://pypi.org/project/thoughtful)
[![Downloads](https://pepy.tech/badge/thoughtful/month)](https://pepy.tech/project/thoughtful)
[//]: # ([![GitHub release](https://img.shields.io/github/release/Thoughtful-Automation/supervisor.svg)](https://GitHub.com/Naereen/StrapDown.js/releases/))
This project is:
* Open-source: [GitHub][url:gh]
* Owned by [thoughtful][url:ta]
* Licensed under the [Apache License 2.0][url:al]
Links:
* [Homepage][url:gh]
* [Documentation][url:docs]
* [PyPI][url:pypi]
**thoughtful** is available on [PyPI][url:pypi] and can be installed using pip:
```sh
pip install thoughtful
```
---
**thoughtful** officially supports Python 3.7+.
---
# Libraries
## Supervisor
Supervisor is a Workflow Engine for Digital Workers that constructs
and broadcasts a detailed and structured telemetric log, called the Run Report.
### Detailed documentation
Detailed documentation on how to utilize Supervisor can be found [here][url:supervisor_docs].
### Usage
```python
from thoughtful.supervisor import step, step_scope, supervise, set_step_status
# using the step decorator
@step("2")
def step_2(name: str) -> bool:
print(f'Hello {name}')
return True # some condition
def main() -> None:
# using the step_scope context manager
with step_scope('1') as step_context:
try:
print("Getting credentials")
# ...
except Exception as e:
# set step status using method
step_context.set_status("warning")
if not step_2():
# set step status using function
set_step_status("2", "fail")
if __name__ == '__main__':
with supervise():
main()
```
## Screen Recorder
The ScreenRecorder library facilitates the recording of screen activity from a
programmatic browser session and generates a video file of the recorded session.
### Detailed documentation
Detailed documentation on how to utilize Screen Recorder can be found [here][url:screen_recorder_docs].
### Prerequisites
Ensure you have already downloaded `FFmpeg` as it is utilized to create the video recording.
https://www.ffmpeg.org/download.html
### Installation
Install the optional `screen-recorder` extras
#### Poetry
```shell
poetry install -E screen-recorder
```
#### Pip
```shell
pip install thoughtful[screen-recorder]
```
### Usage
**WARNING: It is essential that you call `end_recording` at the end of a recording.**
**If you do not call `end_recording`, the recording threads will continue to run until your program ends and a
video will not be created.**
```python
from thoughtful.screen_recorder import ScreenRecorder, BrowserManager
from RPA.Browser.Selenium import Selenium # This dependency must be installed separately
class YoutubeScraper(ScreenRecorder):
def __init__(self) -> None:
self._selenium_instance = Selenium()
super().__init__(browser_manager=BrowserManager(instance=self._selenium_instance))
youtube_scraper = YoutubeScraper()
try:
# ... Perform actions here ...
finally:
if youtube_scraper:
# We recommend calling `end_recording` in a `finally` block to ensure that
# video processing occurs and all recording threads are terminated even if the Process fails
youtube_scraper.end_recording()
```
## Contributing
Contributions to **thoughtful** are welcome!
To get started, see the [contributing guide](CONTRIBUTING.md).
---
Made with ❤️ by
[![Thoughtful](https://user-images.githubusercontent.com/1096881/141985289-317c2e72-3c2d-4e6b-800a-0def1a05f599.png)][url:ta]
---
This project is open-source and licensed under the terms of the [Apache License 2.0][url:al].
<!-- Link References -->
[url:ta]: https://www.thoughtful.ai/
[url:gh]: https://github.com/Thoughtful-Automation/supervisor
[url:pypi]: https://pypi.org/project/thoughtful/
[git:issues]: https://github.com/Thoughtful-Automation/supervisor/issues
[url:docs]: https://www.notion.so/thoughtfulautomation/Thoughtful-Library-c0333f67989d4044aa0a595eaf8fd07b
[url:al]: http://www.apache.org/licenses/LICENSE-2.0
[url:supervisor_docs]: https://www.notion.so/thoughtfulautomation/How-to-develop-with-Supervisor-4247b8d2a5a747b6bff1d232ad395e9c
[url:screen_recorder_docs]: https://www.notion.so/thoughtfulautomation/ScreenRecorder-67380d38b18345f9bac039ff0ef38b0a
Raw data
{
"_id": null,
"home_page": "https://thoughtful.ai",
"name": "thoughtful",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.8.1",
"maintainer_email": null,
"keywords": "rpa, robot-framework, robocorp, automation",
"author": "Thoughtful Automation",
"author_email": "care@thoughtful.ai",
"download_url": "https://files.pythonhosted.org/packages/59/ae/119cbef455434debbc247c00727c61a42fedb479ec8d09126e0c37bc8b26/thoughtful-2.10.0.tar.gz",
"platform": null,
"description": "**thoughtful** is a collection of open-source libraries and tools for Robot Process\nAutomation (RPA) development. The goal of this project is to provide a set of\nfor supervising bot execution, and enabling these bots to do more.\n\n[![PyPi version](https://badgen.net/pypi/v/thoughtful/)](https://pypi.org/project/thoughtful/)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/thoughtful.svg)](https://pypi.org/project/thoughtful)\n[![Downloads](https://pepy.tech/badge/thoughtful/month)](https://pepy.tech/project/thoughtful)\n\n[//]: # ([![GitHub release](https://img.shields.io/github/release/Thoughtful-Automation/supervisor.svg)](https://GitHub.com/Naereen/StrapDown.js/releases/))\n\n\nThis project is:\n* Open-source: [GitHub][url:gh]\n* Owned by [thoughtful][url:ta]\n* Licensed under the [Apache License 2.0][url:al]\n\nLinks:\n* [Homepage][url:gh]\n* [Documentation][url:docs]\n* [PyPI][url:pypi]\n\n**thoughtful** is available on [PyPI][url:pypi] and can be installed using pip:\n\n```sh\npip install thoughtful\n```\n\n---\n\n**thoughtful** officially supports Python 3.7+.\n\n---\n\n# Libraries\n\n## Supervisor\n\nSupervisor is a Workflow Engine for Digital Workers that constructs\nand broadcasts a detailed and structured telemetric log, called the Run Report.\n\n### Detailed documentation\nDetailed documentation on how to utilize Supervisor can be found [here][url:supervisor_docs].\n\n### Usage\n```python\nfrom thoughtful.supervisor import step, step_scope, supervise, set_step_status\n\n\n# using the step decorator\n@step(\"2\")\ndef step_2(name: str) -> bool:\n print(f'Hello {name}')\n return True # some condition\n\ndef main() -> None:\n # using the step_scope context manager\n with step_scope('1') as step_context:\n try:\n print(\"Getting credentials\")\n # ...\n except Exception as e:\n # set step status using method\n step_context.set_status(\"warning\")\n\n if not step_2():\n # set step status using function\n set_step_status(\"2\", \"fail\")\n\nif __name__ == '__main__':\n with supervise():\n main()\n```\n\n## Screen Recorder\nThe ScreenRecorder library facilitates the recording of screen activity from a\nprogrammatic browser session and generates a video file of the recorded session.\n\n### Detailed documentation\nDetailed documentation on how to utilize Screen Recorder can be found [here][url:screen_recorder_docs].\n\n### Prerequisites\nEnsure you have already downloaded `FFmpeg` as it is utilized to create the video recording.\n\nhttps://www.ffmpeg.org/download.html\n\n### Installation\nInstall the optional `screen-recorder` extras\n\n#### Poetry\n```shell\npoetry install -E screen-recorder\n```\n\n#### Pip\n```shell\npip install thoughtful[screen-recorder]\n```\n\n### Usage\n\n**WARNING: It is essential that you call `end_recording` at the end of a recording.**\n\n**If you do not call `end_recording`, the recording threads will continue to run until your program ends and a\nvideo will not be created.**\n\n```python\nfrom thoughtful.screen_recorder import ScreenRecorder, BrowserManager\nfrom RPA.Browser.Selenium import Selenium # This dependency must be installed separately\n\nclass YoutubeScraper(ScreenRecorder):\n def __init__(self) -> None:\n self._selenium_instance = Selenium()\n super().__init__(browser_manager=BrowserManager(instance=self._selenium_instance))\n\nyoutube_scraper = YoutubeScraper()\ntry:\n # ... Perform actions here ...\nfinally:\n if youtube_scraper:\n # We recommend calling `end_recording` in a `finally` block to ensure that\n # video processing occurs and all recording threads are terminated even if the Process fails\n youtube_scraper.end_recording()\n```\n\n## Contributing\n\nContributions to **thoughtful** are welcome!\n\nTo get started, see the [contributing guide](CONTRIBUTING.md).\n\n---\n\n Made with \u2764\ufe0f by\n\n [![Thoughtful](https://user-images.githubusercontent.com/1096881/141985289-317c2e72-3c2d-4e6b-800a-0def1a05f599.png)][url:ta]\n\n---\n\nThis project is open-source and licensed under the terms of the [Apache License 2.0][url:al].\n\n\n<!-- Link References -->\n\n[url:ta]: https://www.thoughtful.ai/\n[url:gh]: https://github.com/Thoughtful-Automation/supervisor\n[url:pypi]: https://pypi.org/project/thoughtful/\n[git:issues]: https://github.com/Thoughtful-Automation/supervisor/issues\n[url:docs]: https://www.notion.so/thoughtfulautomation/Thoughtful-Library-c0333f67989d4044aa0a595eaf8fd07b\n[url:al]: http://www.apache.org/licenses/LICENSE-2.0\n[url:supervisor_docs]: https://www.notion.so/thoughtfulautomation/How-to-develop-with-Supervisor-4247b8d2a5a747b6bff1d232ad395e9c\n[url:screen_recorder_docs]: https://www.notion.so/thoughtfulautomation/ScreenRecorder-67380d38b18345f9bac039ff0ef38b0a\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Thoughtful is a python package by Thoughtful for helping manage automations with helpful packages like supervisor",
"version": "2.10.0",
"project_urls": {
"Documentation": "https://www.notion.so/thoughtfulautomation/Thoughtful-Library-c0333f67989d4044aa0a595eaf8fd07b",
"Homepage": "https://thoughtful.ai",
"Repository": "https://github.com/thoughtful-automation/thoughtful"
},
"split_keywords": [
"rpa",
" robot-framework",
" robocorp",
" automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a0ffcccea41f6b8aa784824e67666e8e6704901523bd7ba0ab43929973ecb7f6",
"md5": "9e729d635cab29969e9eeee2144639c7",
"sha256": "74b3024fcf66b7f2fd13254627d83da597dab06cc3d697ad9731f71898847190"
},
"downloads": -1,
"filename": "thoughtful-2.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9e729d635cab29969e9eeee2144639c7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.8.1",
"size": 48255,
"upload_time": "2024-12-14T11:17:07",
"upload_time_iso_8601": "2024-12-14T11:17:07.728198Z",
"url": "https://files.pythonhosted.org/packages/a0/ff/cccea41f6b8aa784824e67666e8e6704901523bd7ba0ab43929973ecb7f6/thoughtful-2.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "59ae119cbef455434debbc247c00727c61a42fedb479ec8d09126e0c37bc8b26",
"md5": "7e20d768a2907d0a1b097d887f1c5b63",
"sha256": "4ac050a8269ce3bf3d236e56905029afb799d845bdb4e6c2d7214f9da90f8b5f"
},
"downloads": -1,
"filename": "thoughtful-2.10.0.tar.gz",
"has_sig": false,
"md5_digest": "7e20d768a2907d0a1b097d887f1c5b63",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.8.1",
"size": 38135,
"upload_time": "2024-12-14T11:17:09",
"upload_time_iso_8601": "2024-12-14T11:17:09.021157Z",
"url": "https://files.pythonhosted.org/packages/59/ae/119cbef455434debbc247c00727c61a42fedb479ec8d09126e0c37bc8b26/thoughtful-2.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-14 11:17:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thoughtful-automation",
"github_project": "thoughtful",
"github_not_found": true,
"lcname": "thoughtful"
}