Expand description
Utility functions for bean ID parsing and status conversion.
Functionsยง
- atomic_
write - Write contents to a file atomically using write-to-temp + rename.
- natural_
cmp - Compare two bean IDs using natural ordering. Parses IDs as dot-separated segments and compares them. Numeric segments are compared numerically, alpha segments lexicographically. Numeric segments sort before alpha segments.
- parse_
status - Convert a status string to a Status enum, or None if invalid.
- title_
to_ slug - Convert a bean title into a URL-safe kebab-case slug for use in filenames.
- validate_
bean_ id - Validate a bean ID to prevent path traversal attacks.