Skip to main content
Glama
python.mdc845 B
--- globs: *.py alwaysApply: false --- - Don't import modules in the middle of code unless there is a good reason to, which is rare. Have a very strong preference toward importing modules at the top of Python files. - Clearly document the reason when importing modules in the middle of the code - Never add unused parameters to a function, even if the parameter has a default value. - Only use default arguments when there is a reason to do so. - Avoid `while True`. While-loops should have a termination condition in the `while` statement, not just in the loop body. - Always use `*`, in function parameter lists when there are adjacent parameters with the same type. - Avoid putting code in `__init__.py` files. - Always include type annotations for function inputs and outputs. - Always prefer Pydantic models or dataclasses to dictionaries.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dbt-labs/dbt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server