CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/configuration-management

Production config management for any backend — centralized config module, env vars, no hardcoded secrets, fail-fast validation

86

1.88x
Quality

77%

Does it follow best practices?

Impact

100%

1.88x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-2/

Build an Email Notification Service

Problem/Feature Description

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 pagination
  • GET /api/notifications/{id} -- get notification details and delivery status
  • POST /api/notifications/bulk -- send the same notification to multiple recipients

Business rules:

  • Email addresses must be valid format
  • Subject line is required, max 200 characters
  • Template ID is optional -- if provided, the body is ignored and the template is used
  • Bulk send is limited to 100 recipients per request
  • All send attempts must be logged with timestamp and delivery status

Use sendgrid for email delivery and sqlite3/aiosqlite for the database.

Output Specification

Produce:

  • app/main.py -- FastAPI application entry point
  • app/routes/notifications.py -- notification route handlers
  • app/db.py -- database setup and queries
  • app/email_client.py -- SendGrid integration
  • requirements.txt -- with dependencies listed
  • .gitignore -- standard Python gitignore

You may create additional files as needed for a well-structured codebase.

evals

tile.json