python-technical-primitives¶
General-purpose Python utilities: datetime operations, text processing, specification pattern.
Installation¶
pip install python-technical-primitives
Public API¶
datetime operations¶
Function |
Purpose |
|---|---|
|
Current UTC datetime with tzinfo |
|
Add days to datetime |
|
Add hours to datetime |
|
Check if datetime has passed |
|
Days until target |
|
ISO 8601 conversion |
text operations¶
Function |
Purpose |
|---|---|
|
Sentence case conversion |
|
Truncate with suffix |
|
Collapse whitespace |
|
Email format check |
|
Remove invalid chars |
|
Get file extension |
specification pattern¶
Class |
Purpose |
|---|---|
|
Base specification (composable with |
|
Both specs satisfied |
|
At least one satisfied |
|
Spec not satisfied |