forked from riga/pymitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
66 lines (50 loc) · 1.55 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- coding: utf-8 -*-
# python imports
from distutils.core import setup
setup(
name = "pymitter",
version = "0.2.4",
packages = ["pymitter"],
description = "Python port of the extended Node.js EventEmitter 2 "
"approach providing namespaces, wildcards and TTL.",
author = "Marcel Rieger",
author_email = "marcelrieger@icloud.com",
url = "https://github.com/riga/pymitter",
keywords = [
"event", "emitter", "eventemitter", "wildcard", "node", "nodejs"
],
classifiers = [
"Programming Language :: Python",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3"
],
long_description = """\
pymitter
========
Python port of the extended Node.js EventEmitter 2 approach providing
namespaces, wildcards and TTL.
Example
-------
::
from pymitter import EventEmitter
ee = EventEmitter()
# decorator usage
@ee.on("myevent")
def handler1(arg):
print "handler1 called with", arg
# callback usage
def handler2(arg):
print "handler2 called with", arg
ee.on("myotherevent", handler2)
# emit
ee.emit("myevent", "foo")
# -> "handler1 called with foo"
ee.emit("myotherevent", "bar")
# -> "handler2 called with bar"
Source code and more info at https://github.com/riga/pymitter.
"""
)