Basic RabbitMQ
Project description
upy-rabbitmq
- Documentation: https://github.com/UpyExplorer/upy-rabbitmq
- Source Code: https://github.com/UpyExplorer/upy-rabbitmq
How to install?
pip install upy-rabbitmq
Config
Add an environment variation called RABBITMQ_URL in your project's .env file.
RABBITMQ_URL=amqp://user:password@remote.server.com:port//vhost
Callback Class
callback.py
import time
from upy_rabbitmq.callback import CallbackProcess
class MyCallBack(CallbackProcess):
def process(self):
time.sleep(5)
print(self.body.decode())
Start Queue
worker.py
from upy_rabbitmq.worker import UpyMQWorker
worker = UpyMQWorker()
worker.start_queue(
key="key",
callback=MyCallBack
)
New Task
client.py
from upy_rabbitmq.client import UpyMQClient
client = UpyMQClient()
client.new_task(
key="key",
message="Hello"
)
Contributing
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
Commit Style
- ⚙️ FEATURE
- 📝 PEP8
- 📌 ISSUE
- 🪲 BUG
- 📘 DOCS
- 📦 PyPI
- ❤️️ TEST
- ⬆️ CI/CD
- ⚠️ SECURITY
License
Distributed under the MIT License. See LICENSE
for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
upy-rabbitmq-0.0.6.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file upy-rabbitmq-0.0.6.tar.gz
.
File metadata
- Download URL: upy-rabbitmq-0.0.6.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b06d69e28eec6bfa71017337e66b4482dbbe9804aac4ca2015c1c4ea2adcff4d |
|
MD5 | 82ebcf3407cfc984eeea9dc04dd266f1 |
|
BLAKE2b-256 | d8970e5f234698f5cd57c8f09478b031a9141bb5f0b65f59f2b44315e309f43a |
File details
Details for the file upy_rabbitmq-0.0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: upy_rabbitmq-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7498b03a7e0cf87fef8f06af745a27bc8a1a721fca155cc8cb99a87ea3cb4c79 |
|
MD5 | 5a465862bf55084d1dc87ae2557a523a |
|
BLAKE2b-256 | 14bda4a89bbe8174e595f14e8cb621ff1f3eea0d7b2d709f6e54390225fc5123 |