semvec/pypi-packages huggingface dataset:
cbvadmin-semantic-ui 0.4.0
Semantic UI template for CBVadmin
License: MIT
Keywords: admin

====================
CBVadmin Semantic UI
====================

Template pack for CBVadmin using Semantic UI css framework

Require following existing django packages.

- crispy-semantic-ui
- django-filter

Installing and configuring
==========================

``pip install cbvadmin-semantic-ui``

Add the following to django settings.py for automatic configuration

.. code-block:: python

    from cbvadmin_semantic_ui.settings import cbvadmin_semantic_ui_settings
    ...
    cbvadmin_semantic_ui_settings(vars())

Or do manual config

.. code-block:: python

    INSTALLED_APPS = [
        ...
        'cbvadmin_semantic_ui',
        'semantic_ui'
    ]
    ...
    CBVADMIN_TEMPLATE_PACK': 'semantic-ui',
    CRISPY_TEMPLATE_PACK': 'semantic-ui',
    CRISPY_ALLOWED_TEMPLATE_PACKS': ('semantic-ui',)
simple-amqp 0.2.6
Simple AMQP lib
License: MIT
Keywords: simple amqp

# Simple AMQP

A simple AMQP lib for Python

## Installation

```bash
# Asyncio
pip install simple-amqp[asyncio]

# Gevent
pip install simple-amqp[gevent]
```

## Example usage

```python
# Asyncio
from asyncio import get_event_loop, sleep

from simple_amqp import AmqpMsg, AmqpParameters
from simple_amqp.asyncio import AsyncioAmqpConnection

conn = AsyncioAmqpConnection(AmqpParameters(host='localhost'))
channel = conn.channel()

exchange = channel.exchange('exchange.name', 'topic', durable=True)


async def msg_received(msg: AmqpMsg):
    if msg.payload == b'ok':
        return True # ack msg

    return False # nack msg


channel \
  .queue('queue.name', durable=True) \
  .bind(exchange, 'topic.name') \
  .consume(msg_received)


async def main():
    await conn.start()
    await channel.publish(AmqpMsg(
        exchange='exchange.name',
        topic='topic.name',
        payload=b'ok',
    ))

    await sleep(1)
    await conn.stop()

loop = get_event_loop()
loop.run_until_complete(main)
```

```python
# Gevent
from gevent import monkey
monkey.patch_all()

from time import sleep

from simple_amqp import AmqpMsg, AmqpParameters
from simple_amqp.gevent import GeventAmqpConnection

conn = GeventAmqpConnection(AmqpParameters(host='localhost'))
channel = conn.channel()

exchange = channel.exchange('exchange.name', 'topic', durable=True)


def msg_received(msg: AmqpMsg):
    if msg.payload == b'ok':
        return True # ack msg

    return False # nack msg


channel \
  .queue('queue.name', durable=True) \
  .bind(exchange, 'topic.name') \
  .consume(msg_received)

conn.start()

channel.publish(AmqpMsg(
    exchange='exchange.name',
    topic='topic.name',
    payload=b'ok',
))

sleep(1)
conn.stop()
```