**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/88/88/e3234de726aa651b0ce25a80628bf20853af38d19f0757646e96dcdb5146/thoughtful-2.9.1.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.9.1",
"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": "7f2cbe48c4767c392e409ed5a32ed7ae36685aa9e614ebccc51e08ef1192908a",
"md5": "e47dba29f8b6ed0c570891bf83b196e6",
"sha256": "5d6ce25ef11f361c20a334500c5f367dcd920934a828c5e71fd2b773395652f3"
},
"downloads": -1,
"filename": "thoughtful-2.9.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e47dba29f8b6ed0c570891bf83b196e6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.8.1",
"size": 47586,
"upload_time": "2024-11-12T18:55:44",
"upload_time_iso_8601": "2024-11-12T18:55:44.397501Z",
"url": "https://files.pythonhosted.org/packages/7f/2c/be48c4767c392e409ed5a32ed7ae36685aa9e614ebccc51e08ef1192908a/thoughtful-2.9.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8888e3234de726aa651b0ce25a80628bf20853af38d19f0757646e96dcdb5146",
"md5": "f7dd7041e4d1efb1076ad261087b13ba",
"sha256": "5fb44e7f49e151a5a286754f9170c1aa4441b0d49dab289971b986ce8f8877ac"
},
"downloads": -1,
"filename": "thoughtful-2.9.1.tar.gz",
"has_sig": false,
"md5_digest": "f7dd7041e4d1efb1076ad261087b13ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.8.1",
"size": 37553,
"upload_time": "2024-11-12T18:55:46",
"upload_time_iso_8601": "2024-11-12T18:55:46.132571Z",
"url": "https://files.pythonhosted.org/packages/88/88/e3234de726aa651b0ce25a80628bf20853af38d19f0757646e96dcdb5146/thoughtful-2.9.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-12 18:55:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thoughtful-automation",
"github_project": "thoughtful",
"github_not_found": true,
"lcname": "thoughtful"
}