feat: indie status page MVP -- FastAPI + SQLite
- 8 DB models (services, incidents, monitors, subscribers, etc.) - Full CRUD API for services, incidents, monitors - Public status page with live data - Incident detail page with timeline - API key authentication - Uptime monitoring scheduler - 13 tests passing - TECHNICAL_DESIGN.md with full spec
This commit is contained in:
commit
902133edd3
4655 changed files with 1342691 additions and 0 deletions
23
venv/lib/python3.11/site-packages/setuptools/_itertools.py
Normal file
23
venv/lib/python3.11/site-packages/setuptools/_itertools.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from more_itertools import consume # noqa: F401
|
||||
|
||||
|
||||
# copied from jaraco.itertools 6.1
|
||||
def ensure_unique(iterable, key=lambda x: x):
|
||||
"""
|
||||
Wrap an iterable to raise a ValueError if non-unique values are encountered.
|
||||
|
||||
>>> list(ensure_unique('abc'))
|
||||
['a', 'b', 'c']
|
||||
>>> consume(ensure_unique('abca'))
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ValueError: Duplicate element 'a' encountered.
|
||||
"""
|
||||
seen = set()
|
||||
seen_add = seen.add
|
||||
for element in iterable:
|
||||
k = key(element)
|
||||
if k in seen:
|
||||
raise ValueError(f"Duplicate element {element!r} encountered.")
|
||||
seen_add(k)
|
||||
yield element
|
||||
Loading…
Add table
Add a link
Reference in a new issue