Production config management for any backend — centralized config module, env vars, no hardcoded secrets, fail-fast validation
86
77%
Does it follow best practices?
Impact
100%
1.88xAverage score across 5 eval scenarios
Passed
No known issues
Build a Python FastAPI service that sends transactional emails through SendGrid and logs notification history to a SQLite database.
Endpoints:
POST /api/notifications/send -- send an email notification (to, subject, body, template_id)GET /api/notifications -- list sent notifications with paginationGET /api/notifications/{id} -- get notification details and delivery statusPOST /api/notifications/bulk -- send the same notification to multiple recipientsBusiness rules:
Use sendgrid for email delivery and sqlite3/aiosqlite for the database.
Produce:
app/main.py -- FastAPI application entry pointapp/routes/notifications.py -- notification route handlersapp/db.py -- database setup and queriesapp/email_client.py -- SendGrid integrationrequirements.txt -- with dependencies listed.gitignore -- standard Python gitignoreYou may create additional files as needed for a well-structured codebase.