semvec/pypi-packages huggingface dataset:
simpleldap 0.8
A module that makes simple LDAP usage simple.
License: MIT
Keywords: ldap simple simpleldap

==============
``simpleldap``
==============


About
=====

A small wrapper around the python-ldap library that provides a more Pythonic
interface for LDAP server connections, LDAP objects, and the common get and
search operations.


Installation
============

Install using pip::

    pip install simpleldap


Examples
========

A quick and easy example using ``simpleldap``::

    >>> import simpleldap
    >>> conn = simpleldap.Connection('directory.example.com')
    >>> user = conn.get("uid=myuser")
    >>> user.dn
    'uid=myuser,dc=directory,dc=example,dc=com'
    >>> user['cn']
    ['Joe Smith', 'Joe M. Smith']
    >>> user.first('cn')
    'Joe Smith'
    >>> conn.close()

The ``Connection`` object can also be used as a context manager, e.g.::

    with simpleldap.Connection('directory.example.com') as conn:
        users = conn.search("(&(givenName=Joe)(sn=Smith))")

A common method for authenticating users is to connect to an LDAP server using
a service user/account and then attempt a bind operation using the user's
credentials (i.e. DN and password).  The ``authenticate`` method makes this
simple::

    with simpleldap.Connection('directory.example.com') as conn:
        is_valid = conn.authenticate('uid=myuser,dc=directory,dc=example,dc=com', 'password')

.. note::
    The ``authentication`` method does not perform an unbind and does not bind again
    using the original connection's credentials; therefore, any further
    actions following a successful ``authenticate`` call will be performed as
    the authenticated user.

LDAP also offers a feature to compare an attribute's value with a given string.
This can occasionally be more efficient and expressive than grabbing an entire
object from the LDAP store. ``simpleldap`` offers a ``compare`` method for this
feature::

    >>> conn = simpleldap.Connection('directory.example.com')
    >>> user_dn = 'uid=myuser,dc=directory,dc=example,dc=com'
    >>> conn.compare(user_dn, 'cn', 'Joe Smith')
    True
muppet 0.1.6
Durable messaging for distributed processing
License: MIT
Keywords: Durable messaging,Distributed processing,Redis

******
muppet
******

`muppet`_ is Python implementation of `mutual`_. muppet provides RemoteChannel for simple messaging across process or machine boundaries and DurableChannel for durable messaging across process or machine boundaries. Both RemoteChannel and DurableChannel use Redis for message store.

.. _muppet: http://github.com/pandastrike/muppet
.. _mutual: http://github.com/pandastrike/mutual


Remote Channel
--------------
Remote Channel follows a pub-sub model where every message sent on a channel is broadcast to all the subscribers listening on the channel.

Usage:
^^^^^^

.. code-block:: python

   from muppet import RemoteChannel

   # define the callback to receive messages
   def callback(message):
     print("received:", message)
     # we are done with the receiver
     receiver.end()

   # redis server details
   redis_options = {"redis": {"host": "127.0.0.1", "port": 6379}}
   # create a remote channel to send messages
   sender = RemoteChannel("greeting", redis_options)
   # create a remote channel to receive messages
   receiver = RemoteChannel("greeting", redis_options)
   # listen for messages by passing the callback
   receiver.listen(callback)
   # send a message
   sender.send("hello")
   # we are done with the sender 
   sender.end()


Durable Channel
---------------
Durable Channel follows a queue model, where a message sent on a channel is picked up by any one of the receivers listening on the channel. Using DurableChannel, senders can send messages with a timeout, so they are informed when a message is not replied to within the specified timeout. Every message is guaranteed to be replied to within a specified timeout, if not, sender is informed via a callback.

Usage:
^^^^^^

.. code-block:: python

   from muppet import DurableChannel

   def timeout_callback(message):
     print "timed out:", message
     # we are done with the worker
     worker.end()
     # we are done with dispatcher
     dispatcher.end()

   # redis server details
   redis_options = {"redis": {"host": "127.0.0.1", "port": 6379}}
   # create a durable channel to dispatch messages
   dispatcher = DurableChannel("dispatcher.1", redis_options)
   # create a durable channel to receive messages, note the 3rd argument which is the callback for handling timeouts
   worker = DurableChannel("worker.1", redis_options, timeout_callback)

   # dispatch a message to worker.1
   dispatcher.send(content="task", to="worker.1")

   # receive the message
   message = worker.receive()
   print "received message:", message["content"]
   # reply to the message
   worker.reply(message=message, response="reply", timeout=5000)

   # receive the reply
   reply = dispatcher.receive()
   print "received reply:", reply["content"]
   
   # we are happy with the reply
   dispatcher.close(reply)

   # we are done with dispatcher and worker
   worker.end()
   dispatcher.end()
alebot 0.1.2
A super lean and highly modularized irc bot
License: MIT

alebot
    ------

    alebot is a super lean and highly modularized irc bot that lets you
    extend it in a python way, using classes and decorators. It supports
    both hooks and background tasks in an easy and fail-safe way.

    Links
    `````

    * `source code <https://github.com/alexex/alebot>`_
    * `docs <https://alebot.readthedocs.org/`_