# py-mon [![](https://img.shields.io/pypi/v/py-mon?color=3776AB&logo=python&style=for-the-badge)](https://pypi.org/project/py-mon/) [![](https://img.shields.io/pypi/dm/py-mon?color=3776AB&logo=python&style=for-the-badge)](https://pypi.org/project/py-mon/)
A modern, easy-to-use package to automatically restart a Python application when file changes are detected!
## Quickstart
I wanted to make this package as easy as possible to use. Here's a quick start, it's all you'll need 😼
### Installation
```
pip install -U py-mon
```
### Execution
```
pymon filename.py
```
That's pretty much it! 😌
If you have a more sophisticated use-case, there are three other arguments you can utilize:
- ``--patterns`` (``-p``) to specify what file patterns to monitor. default: ``*.py``
- ``--watch`` (``-w``) to specify what directory to monitor for changes. default: ``.``
- ``--args`` (``-a``) to pass arguments to the execute script.
#### Examples:
- ``pymon test.py -p "*.json"`` will monitor changes in python and json files
- ``pymon test.py -p "*.json" -w "./data"`` will only monitor changes in python and json files within the ``data`` directory
- ``pymon test.py --args "dev mode"`` will essentially run the program ``python3 test.py dev mode``
Anyway thats basically it! Thanks for everything, I would appreciate it if you could leave a follow or star this repository ❣️ If you have any feature requests, read below!
## Contributing
This package is open source so anyone with adequate Python experience can contribute to this project!
### Report Issues
If you find any issues with the package or in the code, please [create an issue and report it here](https://github.com/kevinjosethomas/py-mon/issues)!
### Fix/Edit Content
If you want to contribute to this package, fork the repository, clone it, make your changes and then [proceed to create a pull request here](https://github.com/kevinjosethomas/py-mon/pulls)
## Inspiration
Back when I was 13, I spent a lot of time developing discord bots and it was a hassle to constantly ``Ctrl+C`` and then run the bot again on my terminal. Since I had just gotten started with web development back then, I decided to make something like [nodemon](https://github.com/remy/nodemon) but for Python so I randomly created this package one evening! I looked back at it a few weeks ago (I'm now 16) and realized over a thousand people download it every month so I quickly rewrote it (v2) to clean it up and add some new features!
![](https://media1.tenor.com/images/5d6cd0c6b0a0ae3c193e766fb8f1ed1f/tenor.gif?itemid=14057131)
Raw data
{
"_id": null,
"home_page": "https://github.com/kevinjosethomas/py-mon",
"name": "py-mon",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "development, testing, monitor",
"author": "kevinjosethomas",
"author_email": "kevin.jt2007@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7e/b6/e259acd15605cad3105234159ae506fe254ad2431021d3175fb6d670d63c/py-mon-2.0.5.tar.gz",
"platform": null,
"description": "# py-mon [![](https://img.shields.io/pypi/v/py-mon?color=3776AB&logo=python&style=for-the-badge)](https://pypi.org/project/py-mon/) [![](https://img.shields.io/pypi/dm/py-mon?color=3776AB&logo=python&style=for-the-badge)](https://pypi.org/project/py-mon/)\nA modern, easy-to-use package to automatically restart a Python application when file changes are detected!\n\n## Quickstart\nI wanted to make this package as easy as possible to use. Here's a quick start, it's all you'll need \ud83d\ude3c\n\n### Installation\n```\npip install -U py-mon\n```\n### Execution\n```\npymon filename.py\n```\n\nThat's pretty much it! \ud83d\ude0c \n\nIf you have a more sophisticated use-case, there are three other arguments you can utilize:\n- ``--patterns`` (``-p``) to specify what file patterns to monitor. default: ``*.py``\n- ``--watch`` (``-w``) to specify what directory to monitor for changes. default: ``.``\n- ``--args`` (``-a``) to pass arguments to the execute script.\n\n#### Examples:\n- ``pymon test.py -p \"*.json\"`` will monitor changes in python and json files\n- ``pymon test.py -p \"*.json\" -w \"./data\"`` will only monitor changes in python and json files within the ``data`` directory\n- ``pymon test.py --args \"dev mode\"`` will essentially run the program ``python3 test.py dev mode``\n\n\nAnyway thats basically it! Thanks for everything, I would appreciate it if you could leave a follow or star this repository \u2763\ufe0f If you have any feature requests, read below!\n\n## Contributing\nThis package is open source so anyone with adequate Python experience can contribute to this project!\n\n### Report Issues\nIf you find any issues with the package or in the code, please [create an issue and report it here](https://github.com/kevinjosethomas/py-mon/issues)!\n\n### Fix/Edit Content\nIf you want to contribute to this package, fork the repository, clone it, make your changes and then [proceed to create a pull request here](https://github.com/kevinjosethomas/py-mon/pulls)\n\n## Inspiration\nBack when I was 13, I spent a lot of time developing discord bots and it was a hassle to constantly ``Ctrl+C`` and then run the bot again on my terminal. Since I had just gotten started with web development back then, I decided to make something like [nodemon](https://github.com/remy/nodemon) but for Python so I randomly created this package one evening! I looked back at it a few weeks ago (I'm now 16) and realized over a thousand people download it every month so I quickly rewrote it (v2) to clean it up and add some new features!\n\n![](https://media1.tenor.com/images/5d6cd0c6b0a0ae3c193e766fb8f1ed1f/tenor.gif?itemid=14057131)\n",
"bugtrack_url": null,
"license": null,
"summary": "\ud83d\udd01 Automatically restart application when file changes are detected; made for development",
"version": "2.0.5",
"project_urls": {
"Homepage": "https://github.com/kevinjosethomas/py-mon"
},
"split_keywords": [
"development",
" testing",
" monitor"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e66d63f95a55248aa49ec4f73e7431005ca0ef472b1a54af442699e5cdc9370c",
"md5": "1d661cb828d8f7318c41afb852324174",
"sha256": "c6dbdbc354d0620c4eb3014a3714cd57fe918317673492dbd5e7c5239bf26e81"
},
"downloads": -1,
"filename": "py_mon-2.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1d661cb828d8f7318c41afb852324174",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5495,
"upload_time": "2024-03-20T02:04:52",
"upload_time_iso_8601": "2024-03-20T02:04:52.848430Z",
"url": "https://files.pythonhosted.org/packages/e6/6d/63f95a55248aa49ec4f73e7431005ca0ef472b1a54af442699e5cdc9370c/py_mon-2.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7eb6e259acd15605cad3105234159ae506fe254ad2431021d3175fb6d670d63c",
"md5": "fb0f8fcd7fd1ad23febbe2593b5cc4c7",
"sha256": "e0f4ba39086a675d579b8866e3c2027ffedb7c3cfa77c3b3d6154f605af1a699"
},
"downloads": -1,
"filename": "py-mon-2.0.5.tar.gz",
"has_sig": false,
"md5_digest": "fb0f8fcd7fd1ad23febbe2593b5cc4c7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4837,
"upload_time": "2024-03-20T02:04:54",
"upload_time_iso_8601": "2024-03-20T02:04:54.324900Z",
"url": "https://files.pythonhosted.org/packages/7e/b6/e259acd15605cad3105234159ae506fe254ad2431021d3175fb6d670d63c/py-mon-2.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-20 02:04:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kevinjosethomas",
"github_project": "py-mon",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "py-mon"
}