celery-pubsub


Namecelery-pubsub JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/Mulugruntz/celery-pubsub
SummaryA Publish and Subscribe library for Celery
upload_time2023-02-14 12:42:26
maintainer
docs_urlNone
authorSamuel GIFFARD
requires_python
licenseMIT
keywords celery publish subscribe pubsub
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # celery-pubsub 1.0.2


[![Build and Test](https://github.com/Mulugruntz/celery-pubsub/actions/workflows/build.yml/badge.svg)](https://github.com/Mulugruntz/celery-pubsub/actions/workflows/build.yml)
[![Code Climate](https://codeclimate.com/github/Mulugruntz/celery-pubsub/badges/gpa.svg)](https://codeclimate.com/github/Mulugruntz/celery-pubsub)
[![Test Coverage](https://codeclimate.com/github/Mulugruntz/celery-pubsub/badges/coverage.svg)](https://codeclimate.com/github/Mulugruntz/celery-pubsub/coverage)
[![Issue Count](https://codeclimate.com/github/Mulugruntz/celery-pubsub/badges/issue_count.svg)](https://codeclimate.com/github/Mulugruntz/celery-pubsub)
[![Downloads](https://pepy.tech/badge/celery-pubsub)](https://pepy.tech/project/celery-pubsub)

Publish and Subscribe with Celery

## Supported dependencies

| Python   | Celery 3                                                              | Celery 4                                                              | Celery 5                                                              |
|----------|-----------------------------------------------------------------------|-----------------------------------------------------------------------|-----------------------------------------------------------------------|
| 2.7      | ![][badge-m_linux_2.7_celery3] ![][badge-t_linux_2.7_celery3]         | ![][badge-m_linux_2.7_celery4] ![][badge-t_linux_2.7_celery4]         | ![][badge-m_linux_2.7_celery5] ![][badge-t_linux_2.7_celery5]         |
| 3.5      | ![][badge-m_linux_3.5_celery3] ![][badge-t_linux_3.5_celery3]         | ![][badge-m_linux_3.5_celery4] ![][badge-t_linux_3.5_celery4]         | ![][badge-m_linux_3.5_celery5] ![][badge-t_linux_3.5_celery5]         |
| 3.6      | ![][badge-m_linux_3.6_celery3] ![][badge-t_linux_3.6_celery3]         | ![][badge-m_linux_3.6_celery4] ![][badge-t_linux_3.6_celery4]         | ![][badge-m_linux_3.6_celery5] ![][badge-t_linux_3.6_celery5]         |
| 3.7      | ![][badge-m_linux_3.7_celery3] ![][badge-t_linux_3.7_celery3]         | ![][badge-m_linux_3.7_celery4] ![][badge-t_linux_3.7_celery4]         | ![][badge-m_linux_3.7_celery5] ![][badge-t_linux_3.7_celery5]         |
| 3.8      | ![][badge-m_linux_3.8_celery3] ![][badge-t_linux_3.8_celery3]         | ![][badge-m_linux_3.8_celery4] ![][badge-t_linux_3.8_celery4]         | ![][badge-m_linux_3.8_celery5] ![][badge-t_linux_3.8_celery5]         |
| 3.9      | ![][badge-m_linux_3.9_celery3] ![][badge-t_linux_3.9_celery3]         | ![][badge-m_linux_3.9_celery4] ![][badge-t_linux_3.9_celery4]         | ![][badge-m_linux_3.9_celery5] ![][badge-t_linux_3.9_celery5]         |
| 3.10     | ![][badge-m_linux_3.10_celery3] ![][badge-t_linux_3.10_celery3]       | ![][badge-m_linux_3.10_celery4] ![][badge-t_linux_3.10_celery4]       | ![][badge-m_linux_3.10_celery5] ![][badge-t_linux_3.10_celery5]       |
| pypy 2.7 | ![][badge-m_linux_pypy2.7_celery3] ![][badge-t_linux_pypy2.7_celery3] | ![][badge-m_linux_pypy2.7_celery4] ![][badge-t_linux_pypy2.7_celery4] | ![][badge-m_linux_pypy2.7_celery5] ![][badge-t_linux_pypy2.7_celery5] |
| pypy 3.6 | ![][badge-m_linux_pypy3.6_celery3] ![][badge-t_linux_pypy3.6_celery3] | ![][badge-m_linux_pypy3.6_celery4] ![][badge-t_linux_pypy3.6_celery4] | ![][badge-m_linux_pypy3.6_celery5] ![][badge-t_linux_pypy3.6_celery5] |


## Basic usage

```python
import celery
import celery_pubsub

@celery.task
def my_task_1(*args, **kwargs):
    return "task 1 done"


@celery.task
def my_task_2(*args, **kwargs):
    return "task 2 done"


# First, let's subscribe
celery_pubsub.subscribe('some.topic', my_task_1)
celery_pubsub.subscribe('some.topic', my_task_2)

# Now, let's publish something
res = celery_pubsub.publish('some.topic', data='something', value=42)

# We can get the results if we want to (and if the tasks returned something)
# But in pub/sub, usually, there's no result.
print(res.get())

# This will get nowhere, as no task subscribed to this topic
res = celery_pubsub.publish('nowhere', data='something else', value=23)
```

## Advanced usage

Wildcards can be used in topic names:

* ``*`` matches any one group
   * ``some.*.test`` will match ``some.awesome.test``, ``some.random.test``
     but not ``some.pretty.cool.test``, ``elsewhere`` or ``here.some.up.test``
   * ``some.*`` will match ``some.test`` and ``some.thing`` but it won't
     match ``some`` or ``some.testy.test``

* ``#`` matches any number of groups
   * ``some.#.test`` will match ``some.awesome.test``, ``some.random.test``,
     ``some.pretty.cool.test`` but not ``elsewhere`` or ``here.some.up.test``
   * ``some.#`` will match anything that starts with ``some.``, such as
     ``some.very.specific.topic.indeed``
   * ``#`` will match anything

```python
# Let's subscribe
celery_pubsub.subscribe('some.*', my_task_1)
celery_pubsub.subscribe('some.*.test', my_task_2)
celery_pubsub.subscribe('some.#', my_task_3)
celery_pubsub.subscribe('#', my_task_4)
celery_pubsub.subscribe('some.beep', my_task_5)
# it's okay to have more than one task on the same topic
celery_pubsub.subscribe('some.beep', my_task_6)

# Let's publish
celery_pubsub.publish('nowhere', 4)               # task 4 only
celery_pubsub.publish('some', 8)                  # task 4 only
celery_pubsub.publish('some.thing', 15)           # tasks 1, 3 and 4
celery_pubsub.publish('some.true.test', 16)       # tasks 2, 3 and 4
celery_pubsub.publish('some.beep', 23)            # tasks 1, 3, 4, 5 and 6
celery_pubsub.publish('some.very.good.test', 42)  # tasks 3 and 4

# And if you want to publish synchronously:
celery_pubsub.publish_now('some.very.good.test', 42)  # tasks 3 and 4

# You can unsubscribe too
celery_pubsub.unsubscribe('#', my_task_4)

# Now, task 4 will not be called anymore
celery_pubsub.publish('some.very.good.test', 42)  # task 3 only
```

## Changelog

* 1.0.2
    * Add stubs file for type hinting.
* 1.0.1
    * Changed `README.rst` to `README.md`.
    * Added better badges to show the supported status for each Celery & Python version. 
* 1.0.0
    * Flexible requirements (no more pinned). Better to support a wide range of environments.
    * Changed test framework from nose to pytest.
    * Flake8
    * Support for Python 3.9 and 3.10.
* 0.2.1
    * Performance: Internally uses a ``set`` to store the subscribed tasks.
    * Updated Codeclimate as the `old reporter <https://github.com/codeclimate/python-test-reporter>`_ is deprecated.
    * Pinned requirements' dependency versions.
        * celery 4.3.0 -> 4.4.0
        * kombu 4.6.4 -> 4.6.7
        * billiard 3.6.1.0 -> 3.6.2.0
        * codeclimate-test-reporter 0.2.3 -> removed!
* 0.2.0
    * Removed Python 3.4 support. Reason: no longer supported by Kombu 4.6+.
    * Officially supported by Python 3.8.
    * Pinned requirements' dependency versions.
        * celery 4.2.1 -> 4.3.0
        * kombu 4.2.1 -> 4.6.4
        * billiard 3.5.0.4 -> 3.6.1.0
        * vine 1.1.4 -> 1.3.0
* 0.1.9
    * Added Python 3.4, 3.5, 3.7, and multiple branches of pypy
    * Pinned requirements' dependency versions.
        * celery 4.1.0 -> 4.2.1
        * kombu 4.1.0 -> 4.2.1
        * billiard 3.5.0 -> 3.5.0.4
        * nose pinned to 1.3.7
        * coverage pinned to 4.3.4 (was already 4.3.4 but fuzzy)
        * codeclimate-test-reported pinned to 0.2.3
    * Extra badge to show the number of downloads (thanks to PePy)
* 0.1.8
    * Fixup for broken ``pip install celery_pubsub==0.1.7``
* 0.1.7
    * PyPI long description fixed
    * Removed README.md and fixed README.rst
    * Added command ``python setup.py test`` to run unit tests with coverage
    * pypy support
* 0.1.5
    * Python 3 support
* 0.1.1
    * Added README
    * Refined setup
    * No need to access celery_pubsub.pubsub anymore. Direct access in celery_pubsub.
    * Tests moved out of package
    * Added Travis for CI
* 0.1
    * Initial version

[//]: # (Badges)
[//]: # (Status in master)
[badge-m_linux_2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_2.7_celery3/shields
[badge-m_linux_2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_2.7_celery4/shields
[badge-m_linux_2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_2.7_celery5/shields

[badge-m_linux_3.4_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.4_celery3/shields
[badge-m_linux_3.4_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.4_celery4/shields
[badge-m_linux_3.4_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.4_celery5/shields

[badge-m_linux_3.5_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.5_celery3/shields
[badge-m_linux_3.5_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.5_celery4/shields
[badge-m_linux_3.5_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.5_celery5/shields

[badge-m_linux_3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.6_celery3/shields
[badge-m_linux_3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.6_celery4/shields
[badge-m_linux_3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.6_celery5/shields

[badge-m_linux_3.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.7_celery3/shields
[badge-m_linux_3.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.7_celery4/shields
[badge-m_linux_3.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.7_celery5/shields

[badge-m_linux_3.8_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.8_celery3/shields
[badge-m_linux_3.8_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.8_celery4/shields
[badge-m_linux_3.8_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.8_celery5/shields

[badge-m_linux_3.9_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.9_celery3/shields
[badge-m_linux_3.9_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.9_celery4/shields
[badge-m_linux_3.9_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.9_celery5/shields

[badge-m_linux_3.10_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.10_celery3/shields
[badge-m_linux_3.10_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.10_celery4/shields
[badge-m_linux_3.10_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.10_celery5/shields

[badge-m_linux_pypy2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-2.7_celery3/shields
[badge-m_linux_pypy2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-2.7_celery4/shields
[badge-m_linux_pypy2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-2.7_celery5/shields

[badge-m_linux_pypy3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-3.6_celery3/shields
[badge-m_linux_pypy3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-3.6_celery4/shields
[badge-m_linux_pypy3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-3.6_celery5/shields

[//]: # (Status in tagged version)
[badge-t_linux_2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_2.7_celery3/shields
[badge-t_linux_2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_2.7_celery4/shields
[badge-t_linux_2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_2.7_celery5/shields

[badge-t_linux_3.4_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.4_celery3/shields
[badge-t_linux_3.4_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.4_celery4/shields
[badge-t_linux_3.4_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.4_celery5/shields

[badge-t_linux_3.5_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.5_celery3/shields
[badge-t_linux_3.5_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.5_celery4/shields
[badge-t_linux_3.5_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.5_celery5/shields

[badge-t_linux_3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.6_celery3/shields
[badge-t_linux_3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.6_celery4/shields
[badge-t_linux_3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.6_celery5/shields

[badge-t_linux_3.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.7_celery3/shields
[badge-t_linux_3.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.7_celery4/shields
[badge-t_linux_3.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.7_celery5/shields

[badge-t_linux_3.8_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.8_celery3/shields
[badge-t_linux_3.8_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.8_celery4/shields
[badge-t_linux_3.8_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.8_celery5/shields

[badge-t_linux_3.9_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.9_celery3/shields
[badge-t_linux_3.9_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.9_celery4/shields
[badge-t_linux_3.9_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.9_celery5/shields

[badge-t_linux_3.10_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.10_celery3/shields
[badge-t_linux_3.10_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.10_celery4/shields
[badge-t_linux_3.10_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.10_celery5/shields

[badge-t_linux_pypy2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-2.7_celery3/shields
[badge-t_linux_pypy2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-2.7_celery4/shields
[badge-t_linux_pypy2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-2.7_celery5/shields

[badge-t_linux_pypy3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-3.6_celery3/shields
[badge-t_linux_pypy3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-3.6_celery4/shields
[badge-t_linux_pypy3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-3.6_celery5/shields



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Mulugruntz/celery-pubsub",
    "name": "celery-pubsub",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "celery,publish,subscribe,pubsub",
    "author": "Samuel GIFFARD",
    "author_email": "mulugruntz@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4d/f3/4ec56031ec657744682fa4b3a036507ac67b295829b1e05351062a540b74/celery-pubsub-1.0.2.tar.gz",
    "platform": null,
    "description": "# celery-pubsub 1.0.2\n\n\n[![Build and Test](https://github.com/Mulugruntz/celery-pubsub/actions/workflows/build.yml/badge.svg)](https://github.com/Mulugruntz/celery-pubsub/actions/workflows/build.yml)\n[![Code Climate](https://codeclimate.com/github/Mulugruntz/celery-pubsub/badges/gpa.svg)](https://codeclimate.com/github/Mulugruntz/celery-pubsub)\n[![Test Coverage](https://codeclimate.com/github/Mulugruntz/celery-pubsub/badges/coverage.svg)](https://codeclimate.com/github/Mulugruntz/celery-pubsub/coverage)\n[![Issue Count](https://codeclimate.com/github/Mulugruntz/celery-pubsub/badges/issue_count.svg)](https://codeclimate.com/github/Mulugruntz/celery-pubsub)\n[![Downloads](https://pepy.tech/badge/celery-pubsub)](https://pepy.tech/project/celery-pubsub)\n\nPublish and Subscribe with Celery\n\n## Supported dependencies\n\n| Python   | Celery 3                                                              | Celery 4                                                              | Celery 5                                                              |\n|----------|-----------------------------------------------------------------------|-----------------------------------------------------------------------|-----------------------------------------------------------------------|\n| 2.7      | ![][badge-m_linux_2.7_celery3] ![][badge-t_linux_2.7_celery3]         | ![][badge-m_linux_2.7_celery4] ![][badge-t_linux_2.7_celery4]         | ![][badge-m_linux_2.7_celery5] ![][badge-t_linux_2.7_celery5]         |\n| 3.5      | ![][badge-m_linux_3.5_celery3] ![][badge-t_linux_3.5_celery3]         | ![][badge-m_linux_3.5_celery4] ![][badge-t_linux_3.5_celery4]         | ![][badge-m_linux_3.5_celery5] ![][badge-t_linux_3.5_celery5]         |\n| 3.6      | ![][badge-m_linux_3.6_celery3] ![][badge-t_linux_3.6_celery3]         | ![][badge-m_linux_3.6_celery4] ![][badge-t_linux_3.6_celery4]         | ![][badge-m_linux_3.6_celery5] ![][badge-t_linux_3.6_celery5]         |\n| 3.7      | ![][badge-m_linux_3.7_celery3] ![][badge-t_linux_3.7_celery3]         | ![][badge-m_linux_3.7_celery4] ![][badge-t_linux_3.7_celery4]         | ![][badge-m_linux_3.7_celery5] ![][badge-t_linux_3.7_celery5]         |\n| 3.8      | ![][badge-m_linux_3.8_celery3] ![][badge-t_linux_3.8_celery3]         | ![][badge-m_linux_3.8_celery4] ![][badge-t_linux_3.8_celery4]         | ![][badge-m_linux_3.8_celery5] ![][badge-t_linux_3.8_celery5]         |\n| 3.9      | ![][badge-m_linux_3.9_celery3] ![][badge-t_linux_3.9_celery3]         | ![][badge-m_linux_3.9_celery4] ![][badge-t_linux_3.9_celery4]         | ![][badge-m_linux_3.9_celery5] ![][badge-t_linux_3.9_celery5]         |\n| 3.10     | ![][badge-m_linux_3.10_celery3] ![][badge-t_linux_3.10_celery3]       | ![][badge-m_linux_3.10_celery4] ![][badge-t_linux_3.10_celery4]       | ![][badge-m_linux_3.10_celery5] ![][badge-t_linux_3.10_celery5]       |\n| pypy 2.7 | ![][badge-m_linux_pypy2.7_celery3] ![][badge-t_linux_pypy2.7_celery3] | ![][badge-m_linux_pypy2.7_celery4] ![][badge-t_linux_pypy2.7_celery4] | ![][badge-m_linux_pypy2.7_celery5] ![][badge-t_linux_pypy2.7_celery5] |\n| pypy 3.6 | ![][badge-m_linux_pypy3.6_celery3] ![][badge-t_linux_pypy3.6_celery3] | ![][badge-m_linux_pypy3.6_celery4] ![][badge-t_linux_pypy3.6_celery4] | ![][badge-m_linux_pypy3.6_celery5] ![][badge-t_linux_pypy3.6_celery5] |\n\n\n## Basic usage\n\n```python\nimport celery\nimport celery_pubsub\n\n@celery.task\ndef my_task_1(*args, **kwargs):\n    return \"task 1 done\"\n\n\n@celery.task\ndef my_task_2(*args, **kwargs):\n    return \"task 2 done\"\n\n\n# First, let's subscribe\ncelery_pubsub.subscribe('some.topic', my_task_1)\ncelery_pubsub.subscribe('some.topic', my_task_2)\n\n# Now, let's publish something\nres = celery_pubsub.publish('some.topic', data='something', value=42)\n\n# We can get the results if we want to (and if the tasks returned something)\n# But in pub/sub, usually, there's no result.\nprint(res.get())\n\n# This will get nowhere, as no task subscribed to this topic\nres = celery_pubsub.publish('nowhere', data='something else', value=23)\n```\n\n## Advanced usage\n\nWildcards can be used in topic names:\n\n* ``*`` matches any one group\n   * ``some.*.test`` will match ``some.awesome.test``, ``some.random.test``\n     but not ``some.pretty.cool.test``, ``elsewhere`` or ``here.some.up.test``\n   * ``some.*`` will match ``some.test`` and ``some.thing`` but it won't\n     match ``some`` or ``some.testy.test``\n\n* ``#`` matches any number of groups\n   * ``some.#.test`` will match ``some.awesome.test``, ``some.random.test``,\n     ``some.pretty.cool.test`` but not ``elsewhere`` or ``here.some.up.test``\n   * ``some.#`` will match anything that starts with ``some.``, such as\n     ``some.very.specific.topic.indeed``\n   * ``#`` will match anything\n\n```python\n# Let's subscribe\ncelery_pubsub.subscribe('some.*', my_task_1)\ncelery_pubsub.subscribe('some.*.test', my_task_2)\ncelery_pubsub.subscribe('some.#', my_task_3)\ncelery_pubsub.subscribe('#', my_task_4)\ncelery_pubsub.subscribe('some.beep', my_task_5)\n# it's okay to have more than one task on the same topic\ncelery_pubsub.subscribe('some.beep', my_task_6)\n\n# Let's publish\ncelery_pubsub.publish('nowhere', 4)               # task 4 only\ncelery_pubsub.publish('some', 8)                  # task 4 only\ncelery_pubsub.publish('some.thing', 15)           # tasks 1, 3 and 4\ncelery_pubsub.publish('some.true.test', 16)       # tasks 2, 3 and 4\ncelery_pubsub.publish('some.beep', 23)            # tasks 1, 3, 4, 5 and 6\ncelery_pubsub.publish('some.very.good.test', 42)  # tasks 3 and 4\n\n# And if you want to publish synchronously:\ncelery_pubsub.publish_now('some.very.good.test', 42)  # tasks 3 and 4\n\n# You can unsubscribe too\ncelery_pubsub.unsubscribe('#', my_task_4)\n\n# Now, task 4 will not be called anymore\ncelery_pubsub.publish('some.very.good.test', 42)  # task 3 only\n```\n\n## Changelog\n\n* 1.0.2\n    * Add stubs file for type hinting.\n* 1.0.1\n    * Changed `README.rst` to `README.md`.\n    * Added better badges to show the supported status for each Celery & Python version. \n* 1.0.0\n    * Flexible requirements (no more pinned). Better to support a wide range of environments.\n    * Changed test framework from nose to pytest.\n    * Flake8\n    * Support for Python 3.9 and 3.10.\n* 0.2.1\n    * Performance: Internally uses a ``set`` to store the subscribed tasks.\n    * Updated Codeclimate as the `old reporter <https://github.com/codeclimate/python-test-reporter>`_ is deprecated.\n    * Pinned requirements' dependency versions.\n        * celery 4.3.0 -> 4.4.0\n        * kombu 4.6.4 -> 4.6.7\n        * billiard 3.6.1.0 -> 3.6.2.0\n        * codeclimate-test-reporter 0.2.3 -> removed!\n* 0.2.0\n    * Removed Python 3.4 support. Reason: no longer supported by Kombu 4.6+.\n    * Officially supported by Python 3.8.\n    * Pinned requirements' dependency versions.\n        * celery 4.2.1 -> 4.3.0\n        * kombu 4.2.1 -> 4.6.4\n        * billiard 3.5.0.4 -> 3.6.1.0\n        * vine 1.1.4 -> 1.3.0\n* 0.1.9\n    * Added Python 3.4, 3.5, 3.7, and multiple branches of pypy\n    * Pinned requirements' dependency versions.\n        * celery 4.1.0 -> 4.2.1\n        * kombu 4.1.0 -> 4.2.1\n        * billiard 3.5.0 -> 3.5.0.4\n        * nose pinned to 1.3.7\n        * coverage pinned to 4.3.4 (was already 4.3.4 but fuzzy)\n        * codeclimate-test-reported pinned to 0.2.3\n    * Extra badge to show the number of downloads (thanks to PePy)\n* 0.1.8\n    * Fixup for broken ``pip install celery_pubsub==0.1.7``\n* 0.1.7\n    * PyPI long description fixed\n    * Removed README.md and fixed README.rst\n    * Added command ``python setup.py test`` to run unit tests with coverage\n    * pypy support\n* 0.1.5\n    * Python 3 support\n* 0.1.1\n    * Added README\n    * Refined setup\n    * No need to access celery_pubsub.pubsub anymore. Direct access in celery_pubsub.\n    * Tests moved out of package\n    * Added Travis for CI\n* 0.1\n    * Initial version\n\n[//]: # (Badges)\n[//]: # (Status in master)\n[badge-m_linux_2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_2.7_celery3/shields\n[badge-m_linux_2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_2.7_celery4/shields\n[badge-m_linux_2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_2.7_celery5/shields\n\n[badge-m_linux_3.4_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.4_celery3/shields\n[badge-m_linux_3.4_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.4_celery4/shields\n[badge-m_linux_3.4_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.4_celery5/shields\n\n[badge-m_linux_3.5_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.5_celery3/shields\n[badge-m_linux_3.5_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.5_celery4/shields\n[badge-m_linux_3.5_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.5_celery5/shields\n\n[badge-m_linux_3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.6_celery3/shields\n[badge-m_linux_3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.6_celery4/shields\n[badge-m_linux_3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.6_celery5/shields\n\n[badge-m_linux_3.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.7_celery3/shields\n[badge-m_linux_3.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.7_celery4/shields\n[badge-m_linux_3.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.7_celery5/shields\n\n[badge-m_linux_3.8_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.8_celery3/shields\n[badge-m_linux_3.8_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.8_celery4/shields\n[badge-m_linux_3.8_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.8_celery5/shields\n\n[badge-m_linux_3.9_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.9_celery3/shields\n[badge-m_linux_3.9_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.9_celery4/shields\n[badge-m_linux_3.9_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.9_celery5/shields\n\n[badge-m_linux_3.10_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.10_celery3/shields\n[badge-m_linux_3.10_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.10_celery4/shields\n[badge-m_linux_3.10_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_3.10_celery5/shields\n\n[badge-m_linux_pypy2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-2.7_celery3/shields\n[badge-m_linux_pypy2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-2.7_celery4/shields\n[badge-m_linux_pypy2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-2.7_celery5/shields\n\n[badge-m_linux_pypy3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-3.6_celery3/shields\n[badge-m_linux_pypy3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-3.6_celery4/shields\n[badge-m_linux_pypy3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/m_linux_pypy-3.6_celery5/shields\n\n[//]: # (Status in tagged version)\n[badge-t_linux_2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_2.7_celery3/shields\n[badge-t_linux_2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_2.7_celery4/shields\n[badge-t_linux_2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_2.7_celery5/shields\n\n[badge-t_linux_3.4_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.4_celery3/shields\n[badge-t_linux_3.4_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.4_celery4/shields\n[badge-t_linux_3.4_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.4_celery5/shields\n\n[badge-t_linux_3.5_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.5_celery3/shields\n[badge-t_linux_3.5_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.5_celery4/shields\n[badge-t_linux_3.5_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.5_celery5/shields\n\n[badge-t_linux_3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.6_celery3/shields\n[badge-t_linux_3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.6_celery4/shields\n[badge-t_linux_3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.6_celery5/shields\n\n[badge-t_linux_3.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.7_celery3/shields\n[badge-t_linux_3.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.7_celery4/shields\n[badge-t_linux_3.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.7_celery5/shields\n\n[badge-t_linux_3.8_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.8_celery3/shields\n[badge-t_linux_3.8_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.8_celery4/shields\n[badge-t_linux_3.8_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.8_celery5/shields\n\n[badge-t_linux_3.9_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.9_celery3/shields\n[badge-t_linux_3.9_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.9_celery4/shields\n[badge-t_linux_3.9_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.9_celery5/shields\n\n[badge-t_linux_3.10_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.10_celery3/shields\n[badge-t_linux_3.10_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.10_celery4/shields\n[badge-t_linux_3.10_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_3.10_celery5/shields\n\n[badge-t_linux_pypy2.7_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-2.7_celery3/shields\n[badge-t_linux_pypy2.7_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-2.7_celery4/shields\n[badge-t_linux_pypy2.7_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-2.7_celery5/shields\n\n[badge-t_linux_pypy3.6_celery3]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-3.6_celery3/shields\n[badge-t_linux_pypy3.6_celery4]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-3.6_celery4/shields\n[badge-t_linux_pypy3.6_celery5]: https://byob.yarr.is/Mulugruntz/celery-pubsub/1.0.2_linux_pypy-3.6_celery5/shields\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Publish and Subscribe library for Celery",
    "version": "1.0.2",
    "split_keywords": [
        "celery",
        "publish",
        "subscribe",
        "pubsub"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "681277edeefc4ec284ab9189e572793fd7a4d72cebaf7883253841131206b6b1",
                "md5": "87837905f7b675dd58c28914d5cee955",
                "sha256": "591092db36075f1fe7cf0e7b666edd3ae4a1aae1ef7b5b3e1569a0c81bd9f382"
            },
            "downloads": -1,
            "filename": "celery_pubsub-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "87837905f7b675dd58c28914d5cee955",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5842,
            "upload_time": "2023-02-14T12:42:20",
            "upload_time_iso_8601": "2023-02-14T12:42:20.574811Z",
            "url": "https://files.pythonhosted.org/packages/68/12/77edeefc4ec284ab9189e572793fd7a4d72cebaf7883253841131206b6b1/celery_pubsub-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4df34ec56031ec657744682fa4b3a036507ac67b295829b1e05351062a540b74",
                "md5": "f9044d890b1a31d38f633aea13b623b7",
                "sha256": "95ef48bf6bdd0800ce2c8323019dbc2295ec834cd4aad4f15f6bf220c317ef97"
            },
            "downloads": -1,
            "filename": "celery-pubsub-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f9044d890b1a31d38f633aea13b623b7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7105,
            "upload_time": "2023-02-14T12:42:26",
            "upload_time_iso_8601": "2023-02-14T12:42:26.101588Z",
            "url": "https://files.pythonhosted.org/packages/4d/f3/4ec56031ec657744682fa4b3a036507ac67b295829b1e05351062a540b74/celery-pubsub-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-14 12:42:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Mulugruntz",
    "github_project": "celery-pubsub",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "celery-pubsub"
}
        
Elapsed time: 1.05888s