Query JSONB and index it with GIN
Filter on JSONB fields with the containment operator and make it fast with a GIN index.
Loading snippets…
137 snippets
Filter on JSONB fields with the containment operator and make it fast with a GIN index.
Make POST requests safe to retry by sending a unique Idempotency-Key that the server can de-duplicate.
A full-height page layout with a sticky footer using grid-template-areas.
The meta, canonical, Open Graph and icon tags every public page should have.
Turn a flat list of associative arrays into groups keyed by a field or callback.
Group an array into a Record by a property or function while keeping the item type.
Collect a list of records into a dictionary of lists keyed by a field or function result.
Get the files added, copied, modified or renamed on your branch, useful for linting or testing only what changed.
Walk a path through nested dicts and lists and return a default instead of raising KeyError.
A small GET helper using urllib with a timeout, status check, size limit and JSON decoding errors.
Create unpredictable tokens for password resets, API keys and CSRF protection with random_bytes.
Locale-aware money, percent and compact number formatting using the built-in Intl.NumberFormat.