# upy-rabbitmq





---
- **Documentation**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)
- **Source Code**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)
---
## How to install?
```python
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
```python
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
```python
from upy_rabbitmq.worker import UpyMQWorker
worker = UpyMQWorker()
worker.start_queue(
key="key",
callback=MyCallBack
)
```
## New Task
> client.py
```python
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**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/UpyExplorer/upy-rabbitmq",
"name": "upy-rabbitmq",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Fernando Celmer",
"author_email": "email@fernandocelmer.com",
"download_url": "https://files.pythonhosted.org/packages/d8/97/0e5f234698f5cd57c8f09478b031a9141bb5f0b65f59f2b44315e309f43a/upy-rabbitmq-0.0.6.tar.gz",
"platform": null,
"description": "# upy-rabbitmq\n\n\n\n\n\n\n\n---\n\n- **Documentation**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)\n- **Source Code**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)\n\n---\n\n## How to install?\n\n```python\npip install upy-rabbitmq\n```\n\n## Config\n\nAdd an environment variation called **RABBITMQ_URL** in your project's .env file.\n\n```\nRABBITMQ_URL=amqp://user:password@remote.server.com:port//vhost\n```\n\n## Callback Class\n> callback.py\n\n```python\n\nimport time\nfrom upy_rabbitmq.callback import CallbackProcess\n\nclass MyCallBack(CallbackProcess):\n\n def process(self):\n time.sleep(5)\n print(self.body.decode())\n```\n\n## Start Queue\n> worker.py\n\n```python\n\nfrom upy_rabbitmq.worker import UpyMQWorker\n\nworker = UpyMQWorker()\nworker.start_queue(\n key=\"key\",\n callback=MyCallBack\n)\n```\n\n## New Task\n> client.py\n\n```python\nfrom upy_rabbitmq.client import UpyMQClient\n\nclient = UpyMQClient()\nclient.new_task(\n key=\"key\",\n message=\"Hello\"\n)\n```\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Commit Style\n\n- \u2699\ufe0f FEATURE\n- \ud83d\udcdd PEP8\n- \ud83d\udccc ISSUE\n- \ud83e\udeb2 BUG\n- \ud83d\udcd8 DOCS\n- \ud83d\udce6 PyPI\n- \u2764\ufe0f\ufe0f TEST\n- \u2b06\ufe0f CI/CD\n- \u26a0\ufe0f SECURITY\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n",
"bugtrack_url": null,
"license": "",
"summary": "Basic RabbitMQ",
"version": "0.0.6",
"project_urls": {
"Homepage": "https://github.com/UpyExplorer/upy-rabbitmq"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "14bda4a89bbe8174e595f14e8cb621ff1f3eea0d7b2d709f6e54390225fc5123",
"md5": "5a465862bf55084d1dc87ae2557a523a",
"sha256": "7498b03a7e0cf87fef8f06af745a27bc8a1a721fca155cc8cb99a87ea3cb4c79"
},
"downloads": -1,
"filename": "upy_rabbitmq-0.0.6-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5a465862bf55084d1dc87ae2557a523a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 4591,
"upload_time": "2023-05-16T00:49:02",
"upload_time_iso_8601": "2023-05-16T00:49:02.563521Z",
"url": "https://files.pythonhosted.org/packages/14/bd/a4a89bbe8174e595f14e8cb621ff1f3eea0d7b2d709f6e54390225fc5123/upy_rabbitmq-0.0.6-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d8970e5f234698f5cd57c8f09478b031a9141bb5f0b65f59f2b44315e309f43a",
"md5": "82ebcf3407cfc984eeea9dc04dd266f1",
"sha256": "b06d69e28eec6bfa71017337e66b4482dbbe9804aac4ca2015c1c4ea2adcff4d"
},
"downloads": -1,
"filename": "upy-rabbitmq-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "82ebcf3407cfc984eeea9dc04dd266f1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3656,
"upload_time": "2023-05-16T00:49:04",
"upload_time_iso_8601": "2023-05-16T00:49:04.692208Z",
"url": "https://files.pythonhosted.org/packages/d8/97/0e5f234698f5cd57c8f09478b031a9141bb5f0b65f59f2b44315e309f43a/upy-rabbitmq-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-16 00:49:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "UpyExplorer",
"github_project": "upy-rabbitmq",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "upy-rabbitmq"
}