Name | myto JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A flexible Python-based task automation framework for personal use cases |
upload_time | 2025-08-15 18:10:47 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2025 ZackaryW
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
automation
personal
scheduler
task
workflow
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# myto
A flexible Python-based task automation framework for personal use cases.
## 🚀 Quick Start
### Installation
```bash
pip install myto
```
or
```bash
# Clone the repository
git clone <your-repo-url>
cd myto
# Install dependencies
rye sync
```
### Basic Usage
```python
from myto.base.runner import MyToRunner
from myto.tasks.openAppTask import OpenAppTask
from myto.when.timer import WhenTimer
# Create a runner with tasks
runner = MyToRunner(
tasks=[
OpenAppTask(appName="notepad.exe"),
OpenAppTask(
appName="cmd",
when=WhenTimer(seconds=10) # Run after 10 seconds
)
],
debug=True
)
# Execute tasks
runner.run()
```
### CLI Usage
```bash
# Run from a Python file
myto run main.py
# Run with custom variable name
myto run main.py --runnervar my_runner
# Merge multiple runners
myto run main.py --path scripts/extra.py --path scripts/more.py
```
## 📋 Core Components
### Tasks
Tasks define what actions to perform. All tasks inherit from `MytoTask`.
#### OpenAppTask
Opens applications or executes commands.
```python
OpenAppTask(
appName="notepad.exe", # Application to open
isPath=True, # Whether it's a path or command
shouldDetach=True, # Run in background
name="Open Notepad", # Optional custom name
when=WhenTimer(minutes=5) # Optional timing condition
)
```
### Timing Conditions (When)
Control when tasks execute using `when` conditions.
#### WhenTimer
Execute after a specific duration:
```python
WhenTimer(
seconds=30, # Wait 30 seconds
minutes=5, # Wait 5 minutes
hours=1 # Wait 1 hour
)
```
#### WhenTime
Execute at a specific time of day:
```python
WhenTime(
hours=14, # 2 PM
minutes=30, # 30 minutes past
seconds=0, # 0 seconds
pm=True # PM time
)
```
### Before Runners
Wait for specific conditions before executing tasks.
#### WaitForProcess
Wait for a process to start or stop:
```python
from myto import Myto
task = OpenAppTask(
appName="my_app.exe",
beforeRunners=[
Myto.beforeRunners.waitForProcess(
processMatch="chrome.exe", # Wait for Chrome
isClosed=False # Wait for it to start
)
]
)
```
#### WaitForWindow
Wait for a window to appear or disappear:
```python
task = OpenAppTask(
appName="my_app.exe",
beforeRunners=[
Myto.beforeRunners.waitForWindow(
windowMatch="Visual Studio Code", # Window title contains this
isClosed=False # Wait for window to appear
)
]
)
```
## 🔧 Advanced Features
### Context Management
Tasks have access to a context system for sharing data between execution phases.
### Custom Tasks
Create your own tasks by inheriting from `MytoTask`:
```python
from myto.base.task import MytoTask
class CustomTask(MytoTask):
def exec(self, ctx):
# Your custom logic here
print(f"Executing: {self.name}")
```
## 🔍 Examples
### Simple App Launcher
```python
runner = MyToRunner(
tasks=[
OpenAppTask(appName="notepad.exe"),
OpenAppTask(appName="calc.exe"),
]
)
runner.run()
```
### Timed Execution
```python
runner = MyToRunner(
tasks=[
OpenAppTask(
appName="backup_script.bat",
when=WhenTime(hours=2, am=True) # Run at 2 AM
),
OpenAppTask(
appName="chrome.exe",
when=WhenTimer(minutes=30) # Run after 30 minutes
)
]
)
runner.run()
```
### Conditional Execution
```python
runner = MyToRunner(
tasks=[
OpenAppTask(
appName="my_app.exe",
beforeRunners=[
WaitForProcess(processMatch="required_service.exe"),
WaitForWindow(windowPattern=r"Ready.*", isClosed=False)
]
)
]
)
runner.run()
```
## 🛠️ Development
- Python 3.8+
- Dependencies managed with [Rye](https://rye-up.com/)
## 📄 License
MIT License - see [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "myto",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "automation, personal, scheduler, task, workflow",
"author": null,
"author_email": "ZackaryW <gitzackw@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/69/ce/430a649dfb952bf53fbb30ea7d7621df486657f1bae4f2d06734f8523fa6/myto-0.1.0.tar.gz",
"platform": null,
"description": "# myto\n\nA flexible Python-based task automation framework for personal use cases.\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n```bash\npip install myto\n```\n\nor\n\n```bash\n# Clone the repository\ngit clone <your-repo-url>\ncd myto\n\n# Install dependencies\nrye sync\n```\n\n### Basic Usage\n```python\nfrom myto.base.runner import MyToRunner\nfrom myto.tasks.openAppTask import OpenAppTask\nfrom myto.when.timer import WhenTimer\n\n# Create a runner with tasks\nrunner = MyToRunner(\n tasks=[\n OpenAppTask(appName=\"notepad.exe\"),\n OpenAppTask(\n appName=\"cmd\", \n when=WhenTimer(seconds=10) # Run after 10 seconds\n )\n ],\n debug=True\n)\n\n# Execute tasks\nrunner.run()\n```\n\n### CLI Usage\n```bash\n# Run from a Python file\nmyto run main.py\n\n# Run with custom variable name\nmyto run main.py --runnervar my_runner\n\n# Merge multiple runners\nmyto run main.py --path scripts/extra.py --path scripts/more.py\n```\n\n## \ud83d\udccb Core Components\n\n### Tasks\nTasks define what actions to perform. All tasks inherit from `MytoTask`.\n\n#### OpenAppTask\nOpens applications or executes commands.\n\n```python\nOpenAppTask(\n appName=\"notepad.exe\", # Application to open\n isPath=True, # Whether it's a path or command\n shouldDetach=True, # Run in background\n name=\"Open Notepad\", # Optional custom name\n when=WhenTimer(minutes=5) # Optional timing condition\n)\n```\n\n### Timing Conditions (When)\nControl when tasks execute using `when` conditions.\n\n#### WhenTimer\nExecute after a specific duration:\n```python\nWhenTimer(\n seconds=30, # Wait 30 seconds\n minutes=5, # Wait 5 minutes \n hours=1 # Wait 1 hour\n)\n```\n\n#### WhenTime\nExecute at a specific time of day:\n```python\nWhenTime(\n hours=14, # 2 PM\n minutes=30, # 30 minutes past\n seconds=0, # 0 seconds\n pm=True # PM time\n)\n```\n\n### Before Runners\nWait for specific conditions before executing tasks.\n\n#### WaitForProcess\nWait for a process to start or stop:\n```python\nfrom myto import Myto\n\ntask = OpenAppTask(\n appName=\"my_app.exe\",\n beforeRunners=[\n Myto.beforeRunners.waitForProcess(\n processMatch=\"chrome.exe\", # Wait for Chrome\n isClosed=False # Wait for it to start\n )\n ]\n)\n```\n\n#### WaitForWindow\nWait for a window to appear or disappear:\n```python\ntask = OpenAppTask(\n appName=\"my_app.exe\", \n beforeRunners=[\n Myto.beforeRunners.waitForWindow(\n windowMatch=\"Visual Studio Code\", # Window title contains this\n isClosed=False # Wait for window to appear\n )\n ]\n)\n```\n\n## \ud83d\udd27 Advanced Features\n\n### Context Management\nTasks have access to a context system for sharing data between execution phases.\n\n### Custom Tasks\nCreate your own tasks by inheriting from `MytoTask`:\n\n```python\nfrom myto.base.task import MytoTask\n\nclass CustomTask(MytoTask):\n def exec(self, ctx):\n # Your custom logic here\n print(f\"Executing: {self.name}\")\n```\n\n## \ud83d\udd0d Examples\n\n### Simple App Launcher\n```python\nrunner = MyToRunner(\n tasks=[\n OpenAppTask(appName=\"notepad.exe\"),\n OpenAppTask(appName=\"calc.exe\"),\n ]\n)\nrunner.run()\n```\n\n### Timed Execution\n```python\nrunner = MyToRunner(\n tasks=[\n OpenAppTask(\n appName=\"backup_script.bat\",\n when=WhenTime(hours=2, am=True) # Run at 2 AM\n ),\n OpenAppTask(\n appName=\"chrome.exe\",\n when=WhenTimer(minutes=30) # Run after 30 minutes\n )\n ]\n)\nrunner.run()\n```\n\n### Conditional Execution\n```python\nrunner = MyToRunner(\n tasks=[\n OpenAppTask(\n appName=\"my_app.exe\",\n beforeRunners=[\n WaitForProcess(processMatch=\"required_service.exe\"),\n WaitForWindow(windowPattern=r\"Ready.*\", isClosed=False)\n ]\n )\n ]\n)\nrunner.run()\n```\n\n## \ud83d\udee0\ufe0f Development\n\n- Python 3.8+\n- Dependencies managed with [Rye](https://rye-up.com/)\n\n## \ud83d\udcc4 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 ZackaryW\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "A flexible Python-based task automation framework for personal use cases",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/ZackaryW/myto",
"Issues": "https://github.com/ZackaryW/myto/issues",
"Repository": "https://github.com/ZackaryW/myto"
},
"split_keywords": [
"automation",
" personal",
" scheduler",
" task",
" workflow"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b7728040515c5a737443aae0658c0dbe2880034238c5dfbcd4a2f54256e20769",
"md5": "ebfa0576fdc20b45063ddcec9f1ab20a",
"sha256": "05c6472a9f95cf011c87fb40a4e7d851d6685627830b5439469e4ba78b554c00"
},
"downloads": -1,
"filename": "myto-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ebfa0576fdc20b45063ddcec9f1ab20a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14542,
"upload_time": "2025-08-15T18:10:46",
"upload_time_iso_8601": "2025-08-15T18:10:46.408157Z",
"url": "https://files.pythonhosted.org/packages/b7/72/8040515c5a737443aae0658c0dbe2880034238c5dfbcd4a2f54256e20769/myto-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "69ce430a649dfb952bf53fbb30ea7d7621df486657f1bae4f2d06734f8523fa6",
"md5": "0567b360ef0e7807525cef4e118da576",
"sha256": "eed2406fc83833cc604d7f2e767823f882eff594769ca95692d240577652bceb"
},
"downloads": -1,
"filename": "myto-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0567b360ef0e7807525cef4e118da576",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12001,
"upload_time": "2025-08-15T18:10:47",
"upload_time_iso_8601": "2025-08-15T18:10:47.542673Z",
"url": "https://files.pythonhosted.org/packages/69/ce/430a649dfb952bf53fbb30ea7d7621df486657f1bae4f2d06734f8523fa6/myto-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-15 18:10:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ZackaryW",
"github_project": "myto",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "myto"
}