Elastic Queue is a library to bear a PubSub projects
### How to use it
Install via PIP
```shell
$ pip install equeue
```
#### Producing
Using ipython
```python
In [1]: from equeue.rabbit.publisher import Publisher
In [2]: pub = Publisher(host='localhost', username='guest', password='guest', queue_name='t')
In [3]: pub.put(message_dict={'id': 1})
Out[3]: <promise@0x10ef18b78>
```
#### By poll
Using ipython
```python
In [1]: from equeue.rabbit.subscriber import Subscriber
In [2]: sub = Subscriber(host='localhost', username='guest', password='guest', queue_name='t')
In [3]: msg = sub.get()
In [4]: if msg:
...: print(msg)
...:
```
#### Consuming
Creating a main.py you'd see better.
```python
from equeue.rabbit.subscriber import Subscriber
def events_out(callback, message, delivery_tag):
print(message)
print(delivery_tag)
callback.ack(delivery_tag)
def main():
sub = Subscriber(host='localhost', username='guest',
password='guest', queue_name='t')
sub.setup_consumer(callback=events_out)
while True:
sub.consume()
if __name__ == '__main__':
main()
```
Then
```shell
$ python main.py
```
### Developing mode
Running tests
To run the project's test you will need to have pytest installed. The instalation is simple as :
```shell
$ pip install pytest
```
And to run the tests you need to ajust yout `PYTHONPATH`
```shell
$ PYTHONPATH=equeue py.test
```
Metadata
Release files for equeue 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| equeue-0.1.5.tar.gz | 5.5 kB | Without provenance | Details for equeue-0.1.5.tar.gz |
Release files / equeue-0.1.5.tar.gz
| Download URL | equeue-0.1.5.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06a6034306a483d0f6f86fb015dbc6ba0edcf1e7be152d1f7514c020823dd36a
|
|
BLAKE2b-256 checksum How to use checksums |
a6f54dff1f1585895df46adbe7316669c74c68d35abe98783c0ed6987d21caf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for equeue 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.