You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.3KB

  1. Metadata-Version: 2.1
  2. Name: blinker
  3. Version: 1.4
  4. Summary: Fast, simple object-to-object and broadcast signaling
  5. Home-page: http://pythonhosted.org/blinker/
  6. Author: Jason Kirtland
  7. Author-email: jek@discorporate.us
  8. License: MIT License
  9. Keywords: signal emit events broadcast
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Programming Language :: Python
  16. Classifier: Programming Language :: Python :: 2
  17. Classifier: Programming Language :: Python :: 2.4
  18. Classifier: Programming Language :: Python :: 2.5
  19. Classifier: Programming Language :: Python :: 2.6
  20. Classifier: Programming Language :: Python :: 2.7
  21. Classifier: Programming Language :: Python :: 3
  22. Classifier: Programming Language :: Python :: 3.0
  23. Classifier: Programming Language :: Python :: 3.1
  24. Classifier: Programming Language :: Python :: 3.2
  25. Classifier: Programming Language :: Python :: 3.3
  26. Classifier: Programming Language :: Python :: 3.4
  27. Classifier: Topic :: Software Development :: Libraries
  28. Classifier: Topic :: Utilities
  29. License-File: LICENSE
  30. License-File: AUTHORS
  31. [![Build Status](https://travis-ci.org/jek/blinker.svg?branch=master)](https://travis-ci.org/jek/blinker)
  32. # Blinker
  33. Blinker provides a fast dispatching system that allows any number of
  34. interested parties to subscribe to events, or "signals".
  35. Signal receivers can subscribe to specific senders or receive signals
  36. sent by any sender.
  37. >>> from blinker import signal
  38. >>> started = signal('round-started')
  39. >>> def each(round):
  40. ... print "Round %s!" % round
  41. ...
  42. >>> started.connect(each)
  43. >>> def round_two(round):
  44. ... print "This is round two."
  45. ...
  46. >>> started.connect(round_two, sender=2)
  47. >>> for round in range(1, 4):
  48. ... started.send(round)
  49. ...
  50. Round 1!
  51. Round 2!
  52. This is round two.
  53. Round 3!
  54. See the [Blinker documentation](https://pythonhosted.org/blinker/) for more information.
  55. ## Requirements
  56. Blinker requires Python 2.4 or higher, Python 3.0 or higher, or Jython 2.5 or higher.
  57. ## Changelog Summary
  58. 1.3 (July 3, 2013)
  59. - The global signal stash behind blinker.signal() is now backed by a
  60. regular name-to-Signal dictionary. Previously, weak references were
  61. held in the mapping and ephemeral usage in code like
  62. ``signal('foo').connect(...)`` could have surprising program behavior
  63. depending on import order of modules.
  64. - blinker.Namespace is now built on a regular dict. Use
  65. blinker.WeakNamespace for the older, weak-referencing behavior.
  66. - Signal.connect('text-sender') uses an alternate hashing strategy to
  67. avoid sharp edges in text identity.
  68. 1.2 (October 26, 2011)
  69. - Added Signal.receiver_connected and Signal.receiver_disconnected
  70. per-Signal signals.
  71. - Deprecated the global 'receiver_connected' signal.
  72. - Verified Python 3.2 support (no changes needed!)
  73. 1.1 (July 21, 2010)
  74. - Added ``@signal.connect_via(sender)`` decorator
  75. - Added ``signal.connected_to`` shorthand name for the
  76. ``temporarily_connected_to`` context manager.
  77. 1.0 (March 28, 2010)
  78. - Python 3.x compatibility
  79. 0.9 (February 26, 2010)
  80. - Sphinx docs, project website
  81. - Added ``with a_signal.temporarily_connected_to(receiver): ...`` support