Current collected state Current
Observed since 20 Oct, 20:28 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
The easy way to catch signals
aerial
===========
A Python library for receiving Unix style signals.
|Build Status| |Coverage Status| |Package Status|
.. |Build Status| image:: https://api.travis-ci.org/chrisbrake/aerial.svg?branch=master
:target: https://travis-ci.org/chrisbrake/aerial
.. |Coverage Status| image:: https://coveralls.io/repos/github/chrisbrake/aerial/badge.svg?branch=master
:target: https://coveralls.io/github/chrisbrake/aerial?branch=master
.. |Package Status| image:: https://badge.fury.io/py/aerial.svg
:target: https://badge.fury.io/py/aerial
.. quick-start-section-marker
This library is meant to be a simple way to deal with handling signals, while avoiding callbacks.
Install it with pip
.. code-block:: bash
pip install aerial
A simple use looks like this:
.. code-block:: python
>>> import time
>>> import signal
>>>
>>> import aerial
>>> def main_loop():
... while not aerial.received(signal.SIGTERM):
... if aerial.received(signal.SIGHUP):
... print('Got a SIGHUP')
... time.sleep(.5)
... print('See you later')
...
>>>
And try out the demo by running the module.
.. code-block:: bash
python -m aerial
[ PID 10852 ] Hello, send me a SIGTERM to exit, or a SIGHUP for a trick # In another terminal
[ PID 10852 ] Neat huh? # kill -SIGHUP 10852
[ PID 10852 ] See you later # kill -SIGTERM 10852
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 24 Sept 2018 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:28 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b392a7a3772cbdb273295d705f77a871cc264bf89992ecf1adb51882d5577d4e