semvec/pypi-packages huggingface dataset:
CloeePy-RabbitMQ 0.0.0
RabbitMQ Plugin for CloeePy Framework
License: MIT
Keywords: mini framework cloee cloeepy rabbitmq

# CloeePy-RabbitMQ
RabbitMQ Plugin for the CloeePy Framework

Attaches a RabbitMQ connection to CloeePy application context.

## Installation

`pip install CloeePy-RabbitMQ`

## Configuration

### Configuration Basics
CloeePy-RabbitMQ configuration must be placed under `CloeePy.Plugins.cloeepy_rabbitmq` in your config file.
The parameters are simply the available `Pika.ConnectionParameters` and `Pika.Credentials`.
For more information on possible configurations please see
[Pika's Documentation](https://pika.readthedocs.io/en/0.10.0/intro.html)

```
CloeePy:
  ...
  Plugins:
    cloeepy_rabbitmq:
      connectionClass: BlockingConnection
      connection:
        host: localhost
        port: 5672
      credentials:
        username: guest
        password: guest
```

### Connection Class

You must specify which of [Pika's Connection Adapters](https://pika.readthedocs.io/en/0.10.0/modules/adapters/index.html#adapters)
you wish to connect with via the `connectionClass` setting. Options are `BlockingConnection` and `SelectConnection`.

### Customize Plugin Namespace

By default, your connection is available on the CloeePy application context as
`app.rabbitmq`. Optionally you can specify a different namespace by which you access
the rabbitmq connection via `pluginNamespace`.

```
...
Plugins:
cloeepy_rabbitmq:
  pluginNamespace: customRabbitMQNS
  connectionClass: BlockingConnection
  connection:
    host: localhost
    port: 5672
  credentials:
    username: guest
    password: guest

```

Then, you would access your Redis connection on the application context like so:

```
app = CloeePy()
result = app.customRabbitMQNS.ping()
app.log.info(result)
```

### Optional Environment Variables

It's best practice NOT to store sensitive data, such as database usernames and passwords,
in plain-text configuration files. Thus, CloeePy-RabbitMQ supports configuring your
password via environment variable.

You need to set the following:

- Username: `CLOEEPY_RABBITMQ_USERNAME`
- Password: `CLOEEPY_RABBITMQ_PASSWORD`

By doing so, you can omit `username` and `password` in your configuration file.


## Usage
```
import os
from cloeepy import CloeePy

if __name__ == "__main__":
  # Required: set config path as environment variable
  os.environ["CLOEEPY_CONFIG_PATH"] = "./example-config.yml"

  # instantiate application instance
  app = CloeePy()

  # Check if RabbitMQ Connection is alive
  if app.rabbitmq.is_open:
    app.log.info("RabbitMQ conection is open")
  else:
    app.log.error("RabbitMQ connection is not open")
```
haveibeenpwnd 0.2.2
Check passwords and emails against HaveIBeenPwnd
License: MIT

python bindings for HaveIBeenPwnd.com V2
========================================

Troy Hunt released a new version of the `Have I Been pwnd Database`. This time with more anonymity
in mind.

Features:
---------

* check if an email was part of a breach
* check if a password is known from a breach against HaveIBeenPwnd.com
    * does not sent passwords to HaveIBeenPwnd.com
    * does not sent complete password hashes to HaveIBeenPwnd.com
* zero dependencies except requests (will be removed later)
* python2 & python3 support
* tests

Usage:
------

You can use HaveIBeenPwnd als command line script or use it as module in other python code.

As command line script
----------------------

Install HaveIBeenPwnd gobally or in a virtual environment:

.. code-block:: bash

    $ pip install haveibeenpwnd

This add shortcuts to haveibeenpwnd, so that you call haveibeenpwnd from everywhere. To check a
password, simply do this:

.. code-block:: bash

    $ haveibeenpwnd --password hunter2
    The password was found 16092 times in the haveibeenpwned.com database.

Remember, haveibeenpwnd does not send the given password into the internet, it sends the first 5
chars of the SHA1 Hash.

To check if a mail has been part of a breach, do this:

.. code-block:: bash

    $ haveibeenpwnd -m test@example.com
    The email <test@example.com> was found in following breaches:
    The <000webhost> breach (2015-03-01) exposed Email addresses, IP addresses, Names and Passwords
    The <8tracks> breach (2017-06-27) exposed Email addresses and Passwords
    ...


As module
---------

Check emails:

.. code-block:: python

    >>> from haveibeenpwnd import check_email
    >>> check_email("test@example.com"))
    >>> check_email("test@example.com")
    {'breaches': [{'Title': '000webhost', ...}]}

and check passwords:

.. code-block:: python

    >>> from haveibeenpwnd import check_password
    >>> check_password('hunter2')
    16092
    >>> check_password('lksdflksdpsökfdsödg')
    0

Installation
------------

You can install haveibeenpwnd with pip:

.. code-block:: bash

    $ pip install haveibeenpwnd


Testing:
--------

You can run tests with:

.. code-block:: bash

    $ tox
videoslicer 1.0.0rc2
Toolbox to slice videos along arbitrary dimensions
License: MIT
Requires Python: >=2.7, <4
Keywords: video slice timestacks crs deltares tudelft

VideoSlicer
===========

This package provides a `VideoSlicer` object that allows you to access
a video file as if it is a matrix. You can create `VideoView` objects
from a `VideoSlicer` object that target specific parts of a video file
using native Python slicing and indexing mechanisms. The `VideoView`
objects can be used to iterate over the frames in arbitrary
dimensions, resulting in `VideoFrame` or `VideoFrameCRS` objects. Both
objects provide a convenient interface to transport, resize, save and
reference frames from the original video file.

As slicing, indexing and iterating is supported in arbitrary
dimensions, the `VideoSlicer` object can be used to quickly extract
timestacks as well as ordinary frames in physical meaningful
coordinates.

Examples
--------

.. code-block:: python

   slicer = VideoSlicer('movie.avi')
   view = slicer[:10,::10,::10]
   for frame in view:
       frame.save('frame{:06d}.jpg'.format(frame.index))

.. code-block:: python

   slicer = VideoSlicer('movie.avi')
   frame = slicer[10,...]
   frame.save('frame.jpg')
   frame.plot()

.. code-block:: python

   slicer = VideoSlicer('movie.avi', axis=2) # loop over horizontal dimension
   for frame in slicer[:,:,::10]:
       frame.T.save('timestack{:06d}.jpg'.format(frame.index)) # transpose to have time on the horizontal axis
interruptingcow 0.8
A watchdog that interrupts long running code.
License: MIT
Keywords: debug watchdog timer interrupt

Interrupting Cow
================

Interruptingcow is a generic utility that can relatively gracefully interrupt
your Python code when it doesn't execute within a specific number of seconds::

    from interruptingcow import timeout

    try:
        with timeout(5, exception=RuntimeError):
            # perform a potentially very slow operation
            pass
    except RuntimeError:
        print "didn't finish within 5 seconds"

Timeouts are specified in seconds (as floats with theoretical microsecond
precision).


Installation
------------
::

    $ pip install interruptingcow


Reentrant
---------

Interruptingcow is fully reentrant, which means that you can have nested
timeouts::

    from interruptingcow import timeout

    class Outer(RuntimeError): pass

    class Inner(RuntimeError): pass

    try:
        with timeout(20.0, Outer):
            try:
                with timeout(1.0, Inner):
                    # some expensive operation
                    try_the_expensive_thing()
            except Inner:
                do_the_cheap_thing_instead()

    except Outer:
        print 'Program as a whole failed to return in 20 secs'

Nested timeouts allow a large outer timeout to contain smaller timeouts. If the
inner timeout is larger than the outer timeout, it is treated as a no-op.


Function Decorators
-------------------

Interruptingcow can be used both as inline with-statements, as shown in the
above examples, as well as function decorator::

    from interruptingcow import timeout

    @timeout(.5)
    def foo():
        with timeout(.3):
            # some expensive operation
            pass


Quotas
------

You can allocate a quota of time and then share it across multiple invocations
to ``timeout()``. This is especially useful if you need to use timeouts inside
a loop::

    from interruptingcow import timeout, Quota

    quota = Quota(1.0)
    for i in something:
        try:
            with timeout(quota, RuntimeError):
                # perform a slow operation
                pass
        except RuntimeError:
            # do a cheaper thing instead

Here the first iterations of the loop will be able to perform the expensive
operation, until the shared quota of 1 second runs out and then the remaining
iterations will perform the cheaper alternative.

A single quota instance can also be shared across all calls to ``timeout()``
your application makes (including nested calls), to give place an upper bound
on the total runtime, regardless of how many calls to ``timeout()`` you have.

Caveats
-------

Interruptingcow uses ``signal(SIGALRM)`` to let the operating system interrupt
program execution. This has the following limitations:

1. Python signal handlers only apply to the main thread, so you cannot use this
   from other threads
2. You must not use this in a program that uses ``SIGALRM`` itself (this
   includes certain profilers)
CloeePy-Redis 0.0.0
Plugin for CloeePy Framework
License: MIT
Keywords: mini framework cloee cloeepy redis

# CloeePy-Redis
Redis Plugin for the CloeePy Framework

Attaches a Redis connection to CloeePy application context.

## Installation

`pip install CloeePy-Redis`

## Configuration

### Configuration Basics
CloeePy-Redis configuration must be placed under `CloeePy.Plugins.cloeepy_redis` in your config file.
The parameters are simply the available `Redis-Py.StrictRedis` connection parameters. For more
information on possible configurations please see [Redis-Py's Documentation](http://redis-py.readthedocs.io/en/latest/)

```
CloeePy:
  ...
  Plugins:
    cloeepy_redis:
      host: localhost
      port: "6379"
      password: "secret"
```

### Customize Plugin Namespace

By default, your Redis connection is available on the CloeePy application context as
`app.redis`. Optionally you can specify a different namespace by which you access
the redis connection via `pluginNamespace`.

```
...
Plugins:
  cloeepy_redis:
    pluginNamespace: customRedisNS
    host: localhost
    port: "6379"
    password: "secret"

```

Then, you would access your Redis connection on the application context like so:

```
app = CloeePy()
result = app.customRedisNS.ping()
app.log.info(result)
```

### Optional Environment Variables

It's best practice NOT to store sensitive data, such as database usernames and passwords,
in plain-text configuration files. Thus, CloeePy-Redis supports configuring your
password via environment variable.

You need to set the following:

- Password: `CLOEEPY_REDIS_PASSWORD`

By doing so, you can omit `password` in your configuration file.


## Usage
```
import os
from cloeepy import CloeePy

if __name__ == "__main__":
  # Required: set config path as environment variable
  os.environ["CLOEEPY_CONFIG_PATH"] = "./example-config.yml"

  # instantiate application instance
  app = CloeePy()

  # Make Redis call and log to stdout
  app.log.info(app.redis.ping())
```