Shipping 39 Packaged Products with Only Pillow and reportlab: A Batch Pipeline Starter Kit**
Last March I lost six hours of batch uploads because of one CSV header. I had 240 JPGs ready for Adobe Stock, generated the metadata file with a script I'd written the night before, and the uploader rejected every row. T
Last March I lost six hours of batch uploads because of one CSV header. I had 240 JPGs ready for Adobe Stock, generated the metadata file with a script I'd written the night before, and the uploader rejected every row. The reason was boring: I had six columns instead of five. Adobe's upload CSV takes exactly five columns in a fixed order. Vecteezy takes four. Dreamstime takes fifteen. There is no partial credit. That night I rewrote the metadata script to hard-code the headers instead of "building" them, and it has not failed since.
That rewrite is now one of four scripts I want to talk about, because the metadata CSV was only the first wall I hit.
The four things that actually stall a solo pipeline
Making the art is the fun part and it is maybe 20 percent of the work. What ate my weeks was the boring half:
- Metadata headers. All three stock channels reject a wrong CSV instantly. Adobe wants 5 columns, Vecteezy 4, Dreamstime 15. My script now writes the exact header each platform demands and nothing else. No cleverness, no extra columns, no guessing.
- Double-posting. Running a batch twice is the fastest way to get an account flagged. I did it once early on, re-uploading 60 files I had already submitted. Now a tiny ledger script tracks every file marked done, and a re-run only shows what is still pending.
- Turning a document into a product. Having content in Markdown and needing a clean PDF with headings, tables, lists, and links. One command, done.
- Packaging. A zip with a real cover image sells. A bare file does not. Packaging means a zip, a 1280x720 cover, and a 600x600 thumbnail, every time, without me touching an image editor.
Four scripts cover all of it. Two need third-party packages: Pillow for the covers and thumbnails, reportlab for the PDFs. The metadata builder and the upload tracker use only the Python standard library, so if those are all you need, there is nothing to install at all.
Running this on a 2 GB server
The whole pipeline runs on 1 vCPU, 2 GB RAM, no GPU. That constraint shaped every script. The habits that made it work:
- One process at a time. Fanning out image jobs in parallel on a single core does not speed anything up, it just pushes you into swap.
-
Free memory between items. An explicit
gc.collect()after each asset keeps long batches from creeping upward. -
Measure peak RSS, not average.
resource.getrusage(RUSAGE_SELF).ru_maxrssshows the real ceiling. My average usage looked fine while one render step was spiking past what I thought the box could do. - One file per subprocess for heavy render steps, so memory is returned to the OS instead of held by a long-lived process.
- Render at the resolution you need. Inspecting a preview at 60 dpi instead of 300 cut one step's memory use dramatically. I only learned this after an out-of-memory kill at 2 AM.
None of this is clever engineering. It is discipline, written into the scripts so I stop re-learning it.
The folder layout that saved my catalogue
At 39 products my project folder became a junk drawer. Files I could not tell apart, zips mixed with raw output, notes lost. The fix was a fixed structure the scripts assume:
project/
assets/ raw output, one file per asset
output/ ready-to-submit files + metadata.csv
packs/ finished product zips + covers
research/ notes and sources
scripts/ the tools
One rule I learned the hard way: keep research/ forever. I deleted my scrape logs and notes once to "clean up", and later wanted the source material for a follow-up product. It was gone. Those notes are raw material for future products, not clutter.
What the numbers look like
The catalogue so far: 1,860 assets made, 1,077 of them ready or submitted to stock platforms, 39 finished products packaged, 856 MB of output. The parent pipeline is around 19,000 lines of Python, with 300+ pages of research behind the rules the scripts enforce. First paid sale: $2.80, for the Digital Asset Factory itself. I am not going to pretend that is a lot of money. It is proof the loop closes: make, package, list, sell.
The four scripts are the packaging layer. In the full system they sit under a free stack: an orchestrator agent that schedules jobs and retries failures, a local LLM proxy, and batch image generation. But the packaging layer is where most makers stall, and it is the part that stands alone.
Where to get it
I packaged the exact scripts, not a tutorial that ends at "here's how you'd do it", into the Pipeline Starter Kit, and the full system built from this work is the Digital Asset Factory: the prompt engine, the pipeline, the packaging tools, the platform rules for Adobe, Vecteezy, and Dreamstime, and the tiny-server notes. It is the thing I wish existed when that CSV got rejected in March.
Building digital products? Free guides & kits for digital product sellers.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.