- Documentation: https://github.com/UpyExplorer/upy-rabbitmq
- Source Code: https://github.com/UpyExplorer/upy-rabbitmq
pip install upy-rabbitmq
Add an environment variation called RABBITMQ_URL in your project's .env file.
RABBITMQ_URL=amqp://user:[email protected]:port//vhost
callback.py
import time
from upy_rabbitmq.callback import CallbackProcess
class MyCallBack(CallbackProcess):
def process(self):
time.sleep(5)
print(self.body.decode())
worker.py
from upy_rabbitmq.worker import UpyMQWorker
worker = UpyMQWorker()
worker.start_queue(
key="key",
callback=MyCallBack
)
client.py
from upy_rabbitmq.client import UpyMQClient
client = UpyMQClient()
client.new_task(
key="key",
message="Hello"
)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- โ๏ธ FEATURE
- ๐ PEP8
- ๐ ISSUE
- ๐ชฒ BUG
- ๐ DOCS
- ๐ฆ PyPI
- โค๏ธ๏ธ TEST
- โฌ๏ธ CI/CD
โ ๏ธ SECURITY
Distributed under the MIT License. See LICENSE
for more information.