File: enum.md

package info (click to toggle)
python-prometheus-client 0.21.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 768 kB
  • sloc: python: 6,309; makefile: 9
file content (13 lines) | stat: -rw-r--r-- 263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
---
title: Enum
weight: 6
---

Enum tracks which of a set of states something is currently in.

```python
from prometheus_client import Enum
e = Enum('my_task_state', 'Description of enum',
        states=['starting', 'running', 'stopped'])
e.state('running')
```