Skip to main content
This package on the Python Package Index Tests

command_watcher

Module to watch the execution of shell scripts. Both streams (stdout and stderr) are captured.

The watcher’s loggers print each message once and do not propagate it to Python’s root logger. Command output is also stored on the command executor and, unless log=False is passed to watch.run(), on the watcher.

watch = Watch()
watch.log.critical('msg')
watch.log.error('msg')
watch.log.warning('msg')
watch.log.info('msg')
watch.log.debug('msg')
watch.run(['rsync', '-av', '/home', '/backup'])
#! /opt/venvs/command_watcher/bin/python

from command_watcher import Watch
watch = Watch(
    config_file='/etc/command-watcher.yml',
    service_name='texlive_update'
)

tlmgr = '/usr/local/texlive/bin/x86_64-linux/tlmgr'

watch.run(f'{tlmgr} update --self')
watch.run(f'{tlmgr} update --all')
installed_packages = watch.run(
    f'{tlmgr} info --only-installed', log=False
)
all_packages = watch.run(f'{tlmgr} info', log=False)

watch.final_report(
    status=0,
    performance_data={
        'installed_packages': installed_packages.line_count_stdout,
        'all_packages': all_packages.line_count_stdout,
    },
)
---
email:
    from_addr: logs@example.com
    to_addr: logs@example.com
    to_addr_critical: critical@example.com
    smtp_login: mailer@mail.example.com
    smtp_password: abcd
    smtp_server: mail.example.com:587

icinga:
    api_endpoint_host: localhost
    api_endpoint_port: 5665
    client_private_key: /etc/pretiac/api-client.key.pem
    client_certificate: /etc/pretiac/api-client.cert.pem
    ca_certificate: /etc/pretiac/ca.crt
    new_host_defaults:
        templates: [passive-host]
    new_service_defaults:
        templates: [passive-service]
        attrs:
        check_interval: monthly

beep:
    activated: true

Metadata

Release files for command_watcher 0.7.0

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

Source distribution (sdist)

Source distribution for command_watcher 0.7.0
File Size Uploaded Provenance Actions
command_watcher-0.7.0.tar.gz 11.3 kB Without provenance Details for command_watcher-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for command_watcher 0.7.0
File Interpreter ABI Platform Actions
command_watcher-0.7.0-py3-none-any.whl Python 3 none any Details for command_watcher-0.7.0-py3-none-any.whl

Total release size: 25.7 kB

Release files / command_watcher-0.7.0.tar.gz

Download URL command_watcher-0.7.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c5a386df21f44112920a37a3663a7cf2c2682809c7e266b089cf9405b69effb5
BLAKE2b-256 checksum
How to use checksums
31c9eb714371d597ee0adaa954132973369fe6d8234bfe0a09e3a6f38e2cf35c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / command_watcher-0.7.0-py3-none-any.whl

Download URL command_watcher-0.7.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c46aaa1bc972710c86c3a5e19e762080e0455e7a4850147640cd039b2e410494
BLAKE2b-256 checksum
How to use checksums
6f784d401449ce4e36253a7cc87d0886706452f76512b736856ddbe35fe97879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for command_watcher 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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