Skip to main content

signal_handler

Handling system signals and taking actions on application termination

Example:

#!/usr/bin/python3

from signal_handler import SignalHandler


if __name__ == '__main__':
    terminator = SignalHandler(handler=lambda: print(
        '\nOn terminate actions here!\n'))
    while True:
        if not terminator.terminated:
            print('Cycle')
        else:
            print(f"Message: {terminator.message}\n"
                  f"Traceback: {terminator.traceback}\n"
                  f"Signal name: {terminator.signal_name}")
            break

Metadata

Release files for signal-handler 0.0.5

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

Source distribution (sdist)

Source distribution for signal-handler 0.0.5
File Size Uploaded
signal_handler-0.0.5.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for signal-handler 0.0.5
File Interpreter ABI Platform
signal_handler-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / signal_handler-0.0.5.tar.gz

Download URL signal_handler-0.0.5.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ebbcb5ac796588c6a0028b2b24d52176500bd95794da0bd5faed39e45d19b4ac
BLAKE2b-256 checksum
How to use checksums
87ec1dd2c6bfd215f17afd77358c073996a7e17bf0fddd7fa5e03656437184a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / signal_handler-0.0.5-py3-none-any.whl

Download URL signal_handler-0.0.5-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36e6f7a1a5a1b3ac1c78f6c4334cc050b8313c1a2bbba5040fef6cd26bbd2f4a
BLAKE2b-256 checksum
How to use checksums
6533165b08fecb51726eeb2b1c8eff57ed54b9bc58afdfa3b9325a216d6f72d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.5 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