Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 1.33 KB

README.md

File metadata and controls

60 lines (36 loc) · 1.33 KB

puppy

Build Status
Code style: black

A featherweight pub/sub architecture genetically engineered to make your project simpler, not more complicated. And to be adorable.

What's in a name?

Publisher–Subscriber + Python → Pub/Sub + .py → Pub + py → puppy

Hello World

import puppy as pup

puppy = pup.Puppy()

pub = puppy.Pub('topic1')
sub = puppy.SubPull('topic1')

pub.send('hello')
pub.send('world')

print(sub.recv_all())
['hello', 'world']

For those unfamiliar with the Pub/Sub pattern, Google and Wikipedia have pretty useful overviews.

Installation

pip install puppy-pubsub

Usage

basic usage

advanced usage

reference

Philosophy

  • Prefer simplicity to speed
  • Do few things elegantly, rather than many things clumsily
  • Puppy is a tool, not a solution

Contributing

guidelines and tutorial

License

MIT