DEV Community

Cover image for Python Prompts -Vibe Coding
Vahid A.Nezhad
Vahid A.Nezhad

Posted on

Python Prompts -Vibe Coding

In this short article, we’ll cover best practices for using coding LLMs to save time on everyday development tasks, so you can spend more effort building real value.

Here are 4 key stages of a typical Python backend project lifecycle, from initialization to feature expansion, showing how LLMs can help at each step.

1. Project Initialization

Start with a simple version, test thoroughly, and then scale your code step by step:

Set up a basic FastAPI app with `/healthcheck`, Pydantic validation, and Uvicorn entrypoint.
Enter fullscreen mode Exit fullscreen mode
Generate a Django project with `users` and `projects` apps. Add SQLite DB and default URLs.
Enter fullscreen mode Exit fullscreen mode
Write a `docker-compose.yml` for this Node.js + PostgreSQL + Redis stack.
Enter fullscreen mode Exit fullscreen mode
Add CORS support to this FastAPI app, allowing requests from `localhost:3000`.
Enter fullscreen mode Exit fullscreen mode

2. Git (Commit, Push, PR Review)

As long as LLMs understand your code changes, they can generate great commit messages.

Summarize changes in this file for a good commit message.
Enter fullscreen mode Exit fullscreen mode
Write a commit message for this diff, following the Conventional Commits format.
Enter fullscreen mode Exit fullscreen mode
Check this PR diff and point out risky changes or missing tests.
Enter fullscreen mode Exit fullscreen mode
Fix merge conflict in this file. Keep changes from both branches where possible.
Enter fullscreen mode Exit fullscreen mode

3. Debugging

Explain this traceback and suggest a fix. Python 3.11 + SQLAlchemy.
Enter fullscreen mode Exit fullscreen mode
Why is this Prisma migration failing? Here's the schema and error.
Enter fullscreen mode Exit fullscreen mode
This Django form isn't saving correctly — find the issue and fix it.
Enter fullscreen mode Exit fullscreen mode
Logs show 500 on `/login`. Trace the root cause in the controller and model.
Enter fullscreen mode Exit fullscreen mode

4. Adding Features to Existing Project

Adding new features can be tricky, so make sure the LLM reviews your code carefully. Keep the feature simple at first. Sometimes LLMs expect production-ready code and try to generate your feature at that level.

Add a `PUT /users/{id}` endpoint to this FastAPI router. Validate input and return updated user.
Enter fullscreen mode Exit fullscreen mode
Create a background job in Django using Celery to send weekly emails.
Enter fullscreen mode Exit fullscreen mode
Add file upload support to this Node.js Express route. Limit to 5MB images only.
Enter fullscreen mode Exit fullscreen mode
Update this Prisma schema to support tags (many-to-many) for blog posts.
Enter fullscreen mode Exit fullscreen mode
Refactor this 200-line function into smaller reusable helpers. Keep tests passing.
Enter fullscreen mode Exit fullscreen mode

This article was originally published on:
https://medium.com/@vahida9i/python-prompts-vibe-coding-642ece6ff8f9

Top comments (0)