Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/pixell-global/sayouWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/pixell-global/sayou/sayou-python-conventions)<a href="https://agentmods.dev/rules/pixell-global/sayou/sayou-python-conventions"><img src="https://agentmods.dev/badge/rules/pixell-global/sayou/sayou-python-conventions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/pixell-global/sayou/sayou-python-conventions"><img src="https://agentmods.dev/badge/rules/pixell-global/sayou/sayou-python-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00535 |
| Opus 5.5 | $0.00000 | $0.00214 |
| Sonnet 5.5 | $0.00000 | $0.00107 |
| Haiku 4.5 | $0.00000 | $0.00053 |
Grade A, and why
sayou-python-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sayou Python conventions
Async
- All I/O-bound code must use
async/await. The codebase is async throughout (SQLAlchemy async, aiosqlite, FastMCP async handlers). - Never introduce synchronous database calls (
session.execute(...)withoutawait) in any hot path. - Use
asyncio.gatherfor concurrent operations where appropriate.
Configuration and environment
- All configuration is driven by
SAYOU_*environment variables (e.g.SAYOU_DATABASE_URL,SAYOU_API_KEY,SAYOU_EMBEDDING_PROVIDER). - Use Pydantic
BaseSettings(viapydantic-settings) for config classes. Do not reados.environdirectly in business logic. - Secrets and deployment-specific values must never be hardcoded; always reference the corresponding
SAYOU_*env var.
Code style (Ruff)
- Line length: 100 characters.
- Target Python version: 3.11.
- Follow Ruff defaults for import ordering, unused imports, and style. Run
ruff checkandruff formatbefore committing. - Use
from __future__ import annotationsat the top of every module for deferred annotation evaluation.
Type annotations
- All public functions and methods must have full type annotations (parameters and return type).
- Use
collections.abctypes (Sequence,Mapping,AsyncIterator, …) rather thantypingequivalents where possible (Python 3.11+).
Database access
- Use SQLAlchemy 2 async session (
AsyncSession). Always acquire sessions through the dependency-injected factory; do not create ad-hoc engine instances in application code. - Alembic migrations live in
alembic/versions/. New schema changes must include a migration script.
Error handling
- Raise domain-specific exceptions rather than bare
Exception. Define custom exceptions in the relevant module. - MCP tool handlers must return structured error responses (not raise uncaught exceptions) so the MCP client receives a well-formed error.
Tests
- All tests are async and use
pytest-asynciowithasyncio_mode = "auto". - Use
motofor mocking AWS services (S3) and provide in-memory SQLite (aiosqlite:///:memory:) for DB tests.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 47 lines · 0 tokens per session scan A 3463759eb4f2
sayou-python-conventions is a cursor rule published in the GitHub repository pixell-global/sayou (28 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 535 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
python-llm-ml-workflow-cursorrules-prompt-file
Cursor rules for Python LLM & ML development with workflow integration.
python
Python best practices and patterns for modern software development with Flask and SQLite.
python-containerization-cursorrules-prompt-file
Cursor rules for Python development with containerization integration.
python-django-general
General coding guidance for Python and Django projects, including naming, formatting, modular apps, built-in tools, and maintainable structure. Python is a programming language, and Django is a Python web framework.
python-general-coding-standards
A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.