Skip to content

Commit b7a3692

Browse files
committed
a simple plugin system
1 parent e9a2545 commit b7a3692

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

streamz/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
from .core import *
44
from .graph import *
55
from .sources import *
6+
from .plugins import load_plugins
7+
8+
load_plugins()
9+
610
try:
711
from .dask import DaskStream, scatter
812
except ImportError:

streamz/plugins.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pkg_resources
2+
3+
4+
def load_plugins():
5+
for entry_point in pkg_resources.iter_entry_points("streamz.plugins"):
6+
entry_point.load()

0 commit comments

Comments
 (0)