Skip to main content

<a href="https://codeclimate.com/github/luanguimaraesla/gabby/maintainability">
<img src="https://api.codeclimate.com/v1/badges/dc94cbf3854b542d3862/maintainability" />
</a>
<a href="https://travis-ci.org/luanguimaraesla/gabby">
<img src="https://travis-ci.org/luanguimaraesla/gabby.svg?branch=master" />
</a>
<a href="https://badge.fury.io/py/gabby">
<img src="https://badge.fury.io/py/gabby.svg" />
</a>
<a href="https://codecov.io/gh/codecov/example-python">
<img src="https://codecov.io/gh/luanguimaraesla/gabby/branch/master/graph/badge.svg" />
</a>


# Python Gabby

A simple controller for message queue pipelines using Mosquitto

## Installing

You can install the package through pip

```bash
pip install gabby
```

## Examples

Before run examples, please initialize the Mosquitto server.

#### Receiving messages

```python
from gabby.gabby import Gabby, Topic
from gabby.controller import Controller


class PrinterGabby(Gabby):
def transform(self, message):
print(f'ARRIVED! Data: {message.data}')
return []


if __name__ == "__main__":
controller = Controller()

topic_A = Topic('queue/a', 'i')
topic_B = Topic('queue/b', 'i')

printer_gabby = PrinterGabby([topic_A], [topic_B])

controller.add_gabby(printer_gabby)
controller.run()
```

#### Transmitting messages

```python
from gabby.gabby import Gabby, Topic
from gabby.message import Message


if __name__ == "__main__":
topic_A = Topic('queue/a', 'i')
topic_B = Topic('queue/b', 'i')

g = Gabby([topic_B], [topic_A])
data = (1,)
g.send(Message(data, g.output_topics))

```


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gabby-0.0.6.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gabby-0.0.6-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file gabby-0.0.6.tar.gz.

File metadata

  • Download URL: gabby-0.0.6.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gabby-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e7b819690066f096264959efea3af2566403f9d45fb5bfa3478c21593b257e38
MD5 88ec6c0b666a25e65b3876913c3918a2
BLAKE2b-256 5f851c30130d7c1a55996f004e7cf6658fb36002583e549ebc8f96d27fc98f59

See more details on using hashes here.

File details

Details for the file gabby-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for gabby-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 adaf3af8035f0d1609dc1c93bc4dbc22b34c04f966cb7c19ebd64e7ad996f7b0
MD5 b0c8c9812e09210f6d94086973604ba1
BLAKE2b-256 fce33a53a5dbb5c047bdcb8382cec6f6fac9a9f6c25958aacb925495725eb751

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.0

2 files

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page