Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

whistle

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whistle

Event dispatcher (see python-whistle.github.io).

  • 1.0.1
  • PyPI
  • Socket score

Maintainers
1

Whistle

Whistle is a lightweight python library that allow your application components to communicate with each other by dispatching events and listening to them.

.. image:: https://img.shields.io/pypi/v/whistle.svg :target: https://pypi.python.org/pypi/whistle :alt: PyPI

.. image:: https://img.shields.io/pypi/pyversions/whistle.svg :target: https://pypi.python.org/pypi/whistle :alt: Versions

.. image:: https://readthedocs.org/projects/whistle/badge/?version=latest :target: http://whistle.readthedocs.org/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://travis-ci.org/python-whistle/whistle.svg?branch=master :target: https://travis-ci.org/python-whistle/whistle

.. image:: https://img.shields.io/coveralls/python-whistle/whistle/master.svg :target: https://coveralls.io/github/python-whistle/whistle?branch=master :alt: Coverage

.. image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpython-whistle%2Fwhistle.svg?type=shield :target: https://app.fossa.io/projects/git%2Bgithub.com%2Fpython-whistle%2Fwhistle?ref=badge_shield :alt: License Status

Install :::::::

.. code-block:: shell

pip install whistle

Quick start :::::::::::

Install the whistle package:

.. code-block:: shell-session

$ pip install whistle

Create an event dispatcher:

.. code-block:: python

from whistle import EventDispatcher

dispatcher = EventDispatcher()

Add a listener to react to events

.. code-block:: python

def on_spectacle_starts(event):
    print('Please turn down your phones!')

dispatcher.add_listener('spectacle.starts', on_spectacle_starts)</code></pre>

Dispatch!

.. code-block:: python

dispatcher.dispatch('spectacle.starts')

Made with ♥ by Romain Dorgueil <https://twitter.com/rdorgueil>_ and contributors <https://github.com/python-whistle/whistle/graphs/contributors>_.

.. image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpython-whistle%2Fwhistle.svg?type=large :target: https://app.fossa.io/projects/git%2Bgithub.com%2Fpython-whistle%2Fwhistle?ref=badge_large :alt: License Status

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc