CodeSapient
Insights

Blog

Ideas, updates, and practical guides from CodeSapient Labs.

Oak library card-catalog drawer with a brass label reading Bulk Operations and index cards for bulkOperationRunQuery, bulkOperationRunMutation and bulk_operations/finish, beside a Shopify GraphQL Admin API card listing JSONL export, staged uploads and five concurrent runs

Shopify Bulk Operations: Export and Import Large Catalogs Without Throttling

How Shopify bulk operations work after API 2026-01: bulk queries, bulk mutations, five concurrent jobs, finish webhooks, JSONL parsing that stays flat on memory, and per-line import errors.

Read article →
Stencilled title Django in Docker on a navy corrugated shipping-container wall, with an orange Stage 1 Builder placard, an arrow labelled COPY, a teal Stage 2 Runtime placard and a data plate listing Python 3.14, Django 6.1, Gunicorn 27.0 and uv 0.13

Django Docker Production Setup: uv, Gunicorn and a Dockerfile That Holds Up

A production Django Docker setup with a multi-stage uv Dockerfile, Gunicorn, WhiteNoise and env-based settings, plus four failures we reproduced, including Django 6.1's new MAILERS check.

Read article →
Toy building bricks comparing two walls: a gappy UUIDv4 wall where a new brick drops into the middle, and a neat UUIDv7 wall where the next brick is added at the end, beside the title UUIDv7 Primary Keys in PostgreSQL 18

UUIDv7 in PostgreSQL 18: Faster, Smaller Primary Keys

Why random UUIDv4 keys bloat PostgreSQL indexes, how UUIDv7 and uuidv7() in PostgreSQL 18 fix it, our 5-million-row lab results, and how to adopt UUIDv7 in Python, Django and Node.

Read article →
Vintage wooden mail sorting rack with brass labels for order fields like order_id, sku, quantity and ship_to, next to a pile of unsorted envelopes

LLM Structured Outputs: Reliable JSON for AI Automation

How LLM structured outputs turn model replies into schema-valid JSON, how OpenAI, Claude, and Gemini differ, and the validation you still need before AI-extracted data reaches Shopify or your ERP.

Read article →
Swiss-style poster reading Auto-buy shipping labels, with a tilted shipping label, barcode, red circle, and a four-step Shopify Flow sequence

Shopify Flow Shipping Labels: How to Auto-Buy Labels Safely

Shopify Flow can now buy shipping labels automatically. Learn how the Purchase shipping label action works, which orders qualify, how to set it up, and the mistakes that waste postage.

Read article →
Retro CRT phosphor terminal cover showing OpenTelemetry JavaScript SDK 3.0 with span hex dump, vector scope, and Node 22 requirement

OpenTelemetry JavaScript SDK 3.0: What Changed and How to Migrate

OpenTelemetry JS SDK 3.0 stabilizes Logs, consolidates tracing packages, requires Node.js 22.15+, and ships dual ESM/CJS exports. Migrate a Node SaaS service and export traces, metrics, and logs over OTLP.

Read article →
Django N+1 queries illustrated as a diner kitchen ticket rail: a large order ticket reading Django N+1 Queries, a cluster of fourteen small one-author tickets circled in red marker as 50 trips to the kitchen, and a single batch order ticket totalling 2 queries

Django N+1 Queries: How to Find and Fix Them (Including Django 6.1 Fetch Modes)

Find and fix Django N+1 queries: detect them with Debug Toolbar, tests and query budgets, fix them with select_related, prefetch_related and annotate, and use Django 6.1 fetch modes safely.

Read article →
API rate limiting illustrated as vintage enamel road signs: a blue API Rate Limiting sign, a 20 requests per second speed-limit sign, a red 429 Too Many Requests stop sign and a Burst Ahead warning sign

API Rate Limiting for SaaS: Algorithms, Headers, and Redis Patterns

A practical guide to API rate limiting for SaaS teams: what to limit by, token bucket vs sliding window, an atomic Redis limiter, good 429 responses with Retry-After and RateLimit headers, and common mistakes.

Read article →
Printed AI chatbot conversation transcripts on a wooden desk being graded with a red fountain pen, with check marks and circled errors under a brass desk lamp

AI Agent Evaluation: How to Test Agents Before They Reach Customers

A practical guide to AI agent evaluation: what to measure, when to use code checks, LLM judges, or human review, how to build test cases from real traces, and how to gate releases.

Read article →