METADATA 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. Metadata-Version: 2.0
  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. [![Build Status](https://travis-ci.org/jek/blinker.svg?branch=master)](https://travis-ci.org/jek/blinker)
  30. # Blinker
  31. Blinker provides a fast dispatching system that allows any number of
  32. interested parties to subscribe to events, or "signals".
  33. Signal receivers can subscribe to specific senders or receive signals
  34. sent by any sender.
  35. >>> from blinker import signal
  36. >>> started = signal('round-started')
  37. >>> def each(round):
  38. ... print "Round %s!" % round
  39. ...
  40. >>> started.connect(each)
  41. >>> def round_two(round):
  42. ... print "This is round two."
  43. ...
  44. >>> started.connect(round_two, sender=2)
  45. >>> for round in range(1, 4):
  46. ... started.send(round)
  47. ...
  48. Round 1!
  49. Round 2!
  50. This is round two.
  51. Round 3!
  52. See the [Blinker documentation](https://pythonhosted.org/blinker/) for more information.
  53. ## Requirements
  54. Blinker requires Python 2.4 or higher, Python 3.0 or higher, or Jython 2.5 or higher.
  55. ## Changelog Summary
  56. 1.3 (July 3, 2013)
  57. - The global signal stash behind blinker.signal() is now backed by a
  58. regular name-to-Signal dictionary. Previously, weak references were
  59. held in the mapping and ephemeral usage in code like
  60. ``signal('foo').connect(...)`` could have surprising program behavior
  61. depending on import order of modules.
  62. - blinker.Namespace is now built on a regular dict. Use
  63. blinker.WeakNamespace for the older, weak-referencing behavior.
  64. - Signal.connect('text-sender') uses an alternate hashing strategy to
  65. avoid sharp edges in text identity.
  66. 1.2 (October 26, 2011)
  67. - Added Signal.receiver_connected and Signal.receiver_disconnected
  68. per-Signal signals.
  69. - Deprecated the global 'receiver_connected' signal.
  70. - Verified Python 3.2 support (no changes needed!)
  71. 1.1 (July 21, 2010)
  72. - Added ``@signal.connect_via(sender)`` decorator
  73. - Added ``signal.connected_to`` shorthand name for the
  74. ``temporarily_connected_to`` context manager.
  75. 1.0 (March 28, 2010)
  76. - Python 3.x compatibility
  77. 0.9 (February 26, 2010)
  78. - Sphinx docs, project website
  79. - Added ``with a_signal.temporarily_connected_to(receiver): ...`` support