Strawberry is a GraphQL library for Python that leverages type annotations to define schemas and resolvers.
The library solves the problem of building GraphQL APIs in Python by using dataclasses and type annotations as the foundation for schema definition. Developers write Python types with standard annotations, and Strawberry automatically generates the corresponding GraphQL schema from those types. This approach eliminates the need to separately define schema in GraphQL syntax and keeps type information synchronized between Python and GraphQL.
Strawberry suits teams already invested in Python's type system and those seeking tight integration with existing Python web frameworks. It works with Django, FastAPI, Starlette, and other ASGI-compatible servers, making it flexible for different deployment contexts. The library includes a mypy plugin for static type-checking of GraphQL schemas, which appeals to projects prioritizing type safety. A built-in development server and CLI tool help developers get started quickly without additional setup.
The project maintains active development with regular contributions across multiple areas. The codebase uses uv for dependency management and enforces code quality through pre-commit hooks. The maintainers respond to security concerns through direct contact rather than public issue tracking, indicating a structured approach to vulnerability handling.