semvec/pypi-packages huggingface dataset:
busie-consumer 1.0.0
Base Kafka Consumer for Busie Projects
Requires Python: >=3.6

# Busie Consumer

A base consumer package for Busie projects. Abstracts polling and configuration setup away from the end user and exposes basic api for starting the poll process.

## Installation

`pip install busie-consumer`

## Usage
```python
from busie_consumer import BaseConsumer

CONFIG = {
    'bootstrap.servers': 'localhost:9092',
    # Other Config as necessary
}

consumer = BaseConsumer(topics=['some-topic', 'another'], config=CONFIG)

for message in consumer.start():
    handle_message(message)

# It may also be helpful to extend this base class and provide helper methods

class HigherLevelConsumer(Consumer):
    def handle_message(self, message):
        # process the message
        reply_topic, reply = determine_reply(message)
        self.send_reply(topic=reply_topic, message=reply, key=message.key())
consumer = HigherLevelConsumer(topics=['topic'], config=CONFIG)

for msg in consumer.start():
    consumer.handle_message(msg)

```

## API

### BaseConsumer

#### Public Methods
* `BaseConsumer(topics=None, config=None)`: Constructor
    * **required** param `topics`: An iterable of strings containing topic names
    * **required** param `config`: A `dict` containing Kafka config **Note** `config` must have `bootstrap.servers` and `group.id` entries
* `start()`: Generator methods. initiates polling. returns a generator
* `close()`: Closes the consumer
* `send_reply(topic=None, message=None, key=None)`: Invokes a producer and uses it to send a reply to the desired topic. Especially helpful for the `Saga Orchestrator` Pattern
**Note** The producer assumes the same config as the consumer class
    * **required** param `topic`: A string representing the desired topic name
    * **required** param `message`: The data to send to the desired topic.
    * **required** param `key`: The desired key for the message
clodss 0.0.6
On-Disk data-structures store with redis-like API.
Requires Python: >=3.6

[![Build Status](https://travis-ci.org/codomatech/clodss.svg?branch=master)](https://travis-ci.org/codomatech/clodss)
[![Code Quality Grade](https://www.code-inspector.com/project/2529/status/svg)](https://frontend.code-inspector.com/public/project/2529/clodss/dashboard)
[![Code Quality Score](https://www.code-inspector.com/project/2529/score/svg)](https://frontend.code-inspector.com/public/project/2529/clodss/dashboard)

# `CLODSS`: *Clo*se<sup>[*](#myfootnote1)</sup> *D*ata-*S*tructures *S*tore #

`clodss` is a data-structures *on-disk* store with an API largly compatible with
`redis`. The goal is to develop a store with the simplicity of the `redis` API
which scales beyond memory capacity, allows harnessing multi-core processors, and
does not burden accesses with network latency.

`clodss` is a product of [Codoma.tech](https://www.codoma.tech/).

---
<a name="myfootnote1">*</a> *"Close"* as opposed to *"Remote"*.

## Roadmap:

Features will be implemented in the order of demand by the community. Please use
The issues section to vote for the next functionality to be developed.

- [x] get
- [x] set
- [x] del
- [x] incr
- [x] incrby
- [x] decr
- [x] decrby
- [x] keys
- [x] scan
- [x] flushdb
- [x] expire
- [x] persist
- [x] lists
    - [x] llen
    - [x] lpop
    - [x] lpush
    - [x] rpop
    - [x] rpush
    - [x] lindex
    - [x] lset
    - [x] lrange
    - [x] linsert
    - [x] ltrim
    - [x] lrem
- [x] hashmaps
    - [x] hset
    - [x] hget
    - [x] hdel
    - [x] hkeys
    - [x] hvalues
    - [x] hgetall
    - [x] hmset
    - [x] hmget