Skip to content

Commit

Permalink
Added a shortcut for creating Monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
superbobry committed Sep 9, 2011
1 parent 6f75a68 commit d1f114c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyxs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@
:copyright: (c) 2011 by Selectel, see AUTHORS for more details.
"""

from .client import Client
from .client import Client, Monitor
from .exceptions import PyXSError, ConnectionError, UnexpectedPacket, \
InvalidOperation, InvalidPath, InvalidPayload
from ._compat import xs, Error


def monitor(*args, **kwargs):
"""A simple shortcut for creating :class:`Monitor` instances.
All arguments are passed to :class:`Client` constructor.
"""
return Client(*args, **kwargs).monitor()

0 comments on commit d1f114c

Please sign in to comment.