Skip to main content

py-file-change

py-file-change is a tool that execute specific command when any file changes in the directory.

Usage

Start cmd/terminal and run following command.

$ python -m py-file-change config.json

Config file

py-file-change requires a configuration file to continue/start the process.

Create a configuration file in root directory or current working directory where you execute the py-file-change

Configuration file must be JSON file and should content required data.

Name Type Default value Description
cmd required - command to execute
watch optional . directory to watch
exclude_ends optional [] ending files will be excluded
do_print optional false print created, changed, deleted files
use_kill optional false uses kill method instead terminate method

Below is the configuration file example that will used to execute command python app.py , watch current directory(.) , if the name of file changed is ending with .json process won't terminate

{
    "cmd" : "python app.py",
    "watch" : ".",
    "exclude_ends" : [
        ".json"
    ],
    "do_print" : false,
    "use_kill" : false
}

py-file-change will take more CPU and Memory when you use it to detect changes in directory that contains large number of files.

Metadata

Release files for py-file-change 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-file-change 0.0.1
File Size Uploaded
py-file-change-0.0.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-file-change 0.0.1
File Interpreter ABI Platform
py_file_change-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / py-file-change-0.0.1.tar.gz

Download URL py-file-change-0.0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
50d627e94fa995d1900083b03da6879542e811e304578dd1cdef6ce61a9b852c
BLAKE2b-256 checksum
How to use checksums
36c106fb987a0da74e7c0728dc9869535dacc831abb41b94e2857970e6c1407e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / py_file_change-0.0.1-py3-none-any.whl

Download URL py_file_change-0.0.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee0b42f2f3a5f08848a417cd9cab37579104b4c50a69cd29776d05049a33c2f6
BLAKE2b-256 checksum
How to use checksums
5e1d4751ddbd645e88c08bc026f8b9e6072f2fe25d559ed11747cd4c91aeb4fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page