Skip to content

Instantly share code, notes, and snippets.

@danielaRiesgo
danielaRiesgo / compare_endpoints.py
Created July 8, 2025 16:12
Scripts to read and compare endpoints across versions of the app
BEFORE_FILE = 'endpoints_before.txt'
AFTER_FILE = 'endpoints_after.txt'
# Copied: termcolor library
COLORS: dict[str, int] = {
"black": 30,
"red": 31,
"green": 32,
"yellow": 33,
"blue": 34,
enum PasswordError: Error {
case tooShort
case tooLong
case noCapitalLetter
}
let password = MutableProperty("")
let validated: ValidatingProperty<String, PasswordError> = ValidatingProperty(password, {
if $0.count < 5 {
return .invalid(.tooShort)