Skip to main content

A Python tool for watching files and directories

Project description

PieReX (Python Re eXecute)

PieReX is a lightweight file watcher for Python development. It monitors files and directories for changes and automatically restarts the given Python script when modifications occur. This helps streamline the development process by reducing manual restarts.

Features

  • Watches for file changes in the specified directories
  • Automatically restarts the Python script when a change is detected
  • Improves development workflow by reducing manual intervention

Installation

You can either install the tool manually by building it first or directly from the PyPI index

Manually

Install packages required for building:

pip install setuptools wheel twine

Build the tool:

python setup.py sdist bdist_wheel 

Then finally install it using pip:

pip install .

From the PyPI Index

pip install pierex

Usage

pierex your_script.py

Optional Flags

  • -d, --dir <path>: Specify the directory to watch (default: current directory)
  • -e, --ext <ext1,ext2>: Watch specific file extensions (default: py)

Example:

pierex -d src -e py,toml my_script.py

Requirements

  • Python 3.6+

How It Works

  1. Pierex monitors the specified directory for changes in relevant files.
  2. When a change is detected, it stops the running Python script.
  3. It restarts the script automatically to reflect the changes.

Contributing

Pull requests and feature suggestions are welcome! Feel free to open an issue if you find a bug or have an idea to improve Pierex.

License

MIT License

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

pierex-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pierex-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pierex-0.1.0.tar.gz.

File metadata

  • Download URL: pierex-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pierex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b4ce00ef5ad75b9a9a5a565234b4a5fb985100916ab8667023cbbc7bad3453b4
MD5 d62a0aa29c3e97809d56ce23ec7f9eaf
BLAKE2b-256 daf3593347d361c7b59807e92dbb62b957e04cd9efcdcb315236e4bbe0b15b95

See more details on using hashes here.

Provenance

The following attestation bundles were made for pierex-0.1.0.tar.gz:

Publisher: pypi.yml on ixlammm/pierex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pierex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pierex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pierex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43ab5ac175f5f05e16f917125b306ef7deb6dad1006ff887dd6765de6ced384a
MD5 e301047dc98537581bfe8e845418d3ea
BLAKE2b-256 c6b8fc3da760f1e796057bc5d4f63298ef8b740f52ae57022cd1762a246e6281

See more details on using hashes here.

Provenance

The following attestation bundles were made for pierex-0.1.0-py3-none-any.whl:

Publisher: pypi.yml on ixlammm/pierex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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