<commit_before># `pressure`
*A reimplementation of Python's synchronized and bounded Queue.Queue on a Redis backend.*

by <NAME> ([@psobot](http://twitter.com/psobot), [psobot.com](http://psobot.com)). Licensed under MIT.

---

`pressure` implements everybody's favourite Python data structure, the
trusty built-in `Queue.Queue`, on top of everybody's favourite distributed
data store, Redis. Nearly all of the original Queue's API is replicated.

`pressure` allows for **synchronized**, **blocking** and **distributed**
(a.k.a.: multi-process) queues to be shared between processes, between 
machines, and even between data centers.

`pressure` is also **multilingual** - the protocol is well-defined (see [`protocol.md`](https://github.com/psobot/pressure/blob/master/protocol.md)) and there are libraries already for different languages, all included
as submodules of this repo:

  - [`pressure-python`](http://github.com/psobot/pressure-python/)
  - [`pressure-c`](http://github.com/psobot/pressure-c/) (not submoduled just yet)
<!--  - [`pressure-go`](http://github.com/psobot/pressure-go/) -->


## Examples

    import pressure

    #   Create two unique handles to the 'test' queue.
    q1 = pressure.PressureQueue('test')
    q2 = pressure.PressureQueue('test')

    #   Create the 'test' queue, giving a bound of 5.
    q1.create(bound=5)<commit_msg>Updated readme once more.<commit_after># `pressure`
*A reimplementation of Python's synchronized and bounded Queue.Queue on a Redis backend.*

by <NAME> ([@psobot](http://twitter.com/psobot), [psobot.com](http://psobot.com)). Licensed under MIT.

---

`pressure` implements everybody's favourite Python data structure, the
trusty built-in `Queue.Queue`, on top of everybody's favourite distributed
data store, Redis. Nearly all of the original Queue's API is replicated.

`pressure` allows for **synchronized**, **blocking** and **distributed**
(a.k.a.: multi-process) queues to be shared between processes, between 
machines, and even between data centers.

`pressure` is also **multilingual** - the protocol is well-defined (see [`protocol.md`](https://github.com/psobot/pressure/blob/master/protocol.md)) and there are libraries already for different languages, all included
as submodules of this repo:

  - [`pressure-python`](http://github.com/psobot/pressure-python/)
  - [`pressure-c`](http://github.com/psobot/pressure-c/) (not submoduled just yet)


<!--  - [`pressure-go`](http://github.com/psobot/pressure-go/) -->


## Examples

    import pressure

    #   Create two unique handles to the 'test' queue.
    q1 = pressure.PressureQueue('test')
    q2 = pressure.PressureQueue('test')

    #   Create the 'test' queue, giving a bound of 5.
    q1.create(bound=5)
{'fraction_non_alphanumeric': 0.14081931236283834, 'fraction_numerical': 0.0036576444769568397, 'mean_word_length': 4.249520153550864, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1934482', 'n_tokens_mistral': 867, 'n_tokens_neox': 802, 'n_words': 260}