Skip to main content

🔁 Automatically restart application when file changes are detected; made for development

Project description

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!

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

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 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-mon-2.0.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

py_mon-2.0.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file py-mon-2.0.5.tar.gz.

File metadata

  • Download URL: py-mon-2.0.5.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for py-mon-2.0.5.tar.gz
Algorithm Hash digest
SHA256 e0f4ba39086a675d579b8866e3c2027ffedb7c3cfa77c3b3d6154f605af1a699
MD5 fb0f8fcd7fd1ad23febbe2593b5cc4c7
BLAKE2b-256 7eb6e259acd15605cad3105234159ae506fe254ad2431021d3175fb6d670d63c

See more details on using hashes here.

File details

Details for the file py_mon-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: py_mon-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for py_mon-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c6dbdbc354d0620c4eb3014a3714cd57fe918317673492dbd5e7c5239bf26e81
MD5 1d661cb828d8f7318c41afb852324174
BLAKE2b-256 e66d63f95a55248aa49ec4f73e7431005ca0ef472b1a54af442699e5cdc9370c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page