File: exchange_type.py

package info (click to toggle)
python-pika 1.3.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,088 kB
  • sloc: python: 20,890; makefile: 134
file content (18 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
try:
    from enum import StrEnum  # available from Python 3.11


    class ExchangeType(StrEnum):
        direct = 'direct'
        fanout = 'fanout'
        headers = 'headers'
        topic = 'topic'
except ImportError:
    from enum import Enum


    class ExchangeType(str, Enum):
        direct = 'direct'
        fanout = 'fanout'
        headers = 'headers'
        topic = 'topic'