Features — pinky-core
Update date : 2026-05-31 16:12
Feature list ordered by priority. stable = in production. planned = not yet built, order = priority.
Stable
| Module | Description | Status |
|---|---|---|
fmt.py |
String/value formatters: snake_case, truncate, normalize whitespace, FR/AFNOR address, ISO3→ISO2 | stable |
validate.py |
Input validation: SIRET/SIREN, IBAN/BIC, TVA EU, NIR, email, phone | stable |
security.py |
Secret masking, PII detection, zero-width space injection/detection | stable |
sql.py |
SQL string helpers: identifier quoting, safe literal injection, comment stripping | stable |
sql_custom.py |
Higher-level SQL builders: WHERE clauses from dicts, IN-list chunking | stable |
xml.py |
XPath helpers, namespace-aware parsing, safe attribute extraction | stable |
files.py |
S3/MFT filename pattern normalisation — detect_file_pattern, FileDetection |
stable |
schedule.py |
French public holidays, business-day helpers, cron human-readable formatting | stable |
Planned
Ordered by priority — closest to implementation first.
schedule.py — timetable predicates
Pure functions replacing the most common Airflow TimetableSchedule patterns:
last_business_day_of_month(d, country="FR") -> bool
first_business_day_of_month(d, country="FR") -> bool
nth_business_day_of_month(d, n, country="FR") -> bool
is_even_week(d) -> bool
is_odd_week(d) -> bool
fiscal_quarter(d, start_month=1) -> int # returns 1–4
days_until_end_of_month(d) -> int
finance/fec.py — FEC parser
New submodule pinky_core/finance/fec.py. Pure Python, no Snowflake connection.
Parses FEC files (tab-separated, ISO-8859-1) into typed FecRow dataclass rows.
Validates DEBIT == CREDIT and mandatory column presence.
schedule.py — additional calendar support
public_holidays_be(year)/public_holidays_uk(year)— expand beyond FRbusiness_days_until_end_of_month(d)— look-ahead for SLA calculationsnth_last_business_day_of_month(d, n)— countdown from month end (e.g. J-2)- Holiday calendar as injectable parameter — custom frozenset for non-standard calendars
finance/ — extend beyond FEC
finance/dsn.py— Déclaration Sociale Nominative parser (INSEE/Net-Entreprises)finance/sepa.py— SEPA pain.001 / pain.008 XML builders (credit transfers, direct debits)finance/ofx.py— bank statement parsers (OFX/QFX for reconciliation)
sql_custom.py — query builder extensions
build_merge()— MERGE INTO stubs from a key/value column dictpaginate_query(sql, page_size, offset)— LIMIT/OFFSET wrapper for cursor-based pagination
validate.py — additional validators
is_luhn(s)— Luhn algorithm for generic checksums not already covered
schedule.py — cron expression builder
Inverse of cron_to_human: build a 5-field cron string from structured parameters.
Council-validate before implementing — may already be covered by existing tools.
fmt.py — slugify
slugify(text) -> str — converts any string to a URL-safe slug (lowercase, ASCII, hyphens).
Use cases: Snowflake object keys, URL segments, file/schema name generation.
fmt.py — locale-aware formatters
French locale (espace insécable, virgule décimale). Low priority: rendering mostly happens at Streamlit level.
finance/ — FEC validator as CLI
python -m pinky_core.finance.fec validate file.txt — depends on snowflake-tools CLI integration.