Cold ScoutCold Scout
HomeFree AuditDirectoryPricingDocsSponsorGet Started
All guides
EngineeringOutline · expanding soon

Building a Sales Pipeline with FastAPI, PostgreSQL, and APScheduler

Architectural notes from building Cold Scout — the open-source AI lead generation pipeline — with FastAPI, async SQLAlchemy, PostgreSQL, and APScheduler.

May 7, 20265 min readBy Samrat Kumar Das

Cold Scout's backend is a useful reference architecture for anyone building an async data pipeline: FastAPI for the HTTP surface, async SQLAlchemy for DB I/O, APScheduler for background jobs, and Pydantic everywhere for the contract.

Why each piece

  • FastAPI — async-first, OpenAPI spec for free, dependency injection that maps cleanly to per-request DB sessions.
  • SQLAlchemy 2.x async — the only Python ORM that's caught up with async cleanly. Use the imperative select() style, not the ORM-implicit lazy-load pattern.
  • PostgreSQL — JSONB for the lead enrichment blobs, full relational for everything else.
  • APScheduler — cron-style jobs in-process. Enough scale for most freelancer/agency workloads. Graduate to Celery + Redis if you outgrow it.

This article is a stub

The full version walks through the actual repo structure, the workers, the retry logic, and the migrations strategy. Coming soon.

Tagged:

FastAPI sales pipelineFastAPI PostgreSQLAPScheduler asyncPython lead generationopen source CRM architecture

Ready to automate your outreach?

Join thousands of freelancers using AI to discover and engage qualified leads.

Get Started Free
Cold ScoutCold Scout

AI-powered lead generation platform that discovers, qualifies, and engages local business leads at scale.

Product

PricingDocumentationLead DirectoryFree ScannerIntegrationsUse casesCompareChangelog

Resources

BlogGuidesFAQSupportAI agents (llms.txt)

Legal

Privacy PolicyTerms of ServiceRefund PolicyData Deletion

Community

GitHub RepositoryReport an IssueLinkedIn Page Sponsor

© 2026 Cold Scout. All rights reserved.

SitemapRobotsBuilt with precision