A Python GraphQL library that uses type annotations and dataclasses to define schemas with static type checking.
Strawberry is a GraphQL library for Python that uses type annotations and dataclasses to define GraphQL schemas. It allows developers to build type-safe GraphQL APIs with a syntax that feels natural in Python, providing static type checking through mypy integration. The library includes a development server, CLI tools, and integrations with popular Python web frameworks.
Python developers building GraphQL APIs who want type safety, clean syntax using dataclasses, and integration with web frameworks like Django or Starlette.
Developers choose Strawberry for its intuitive type annotation-based schema definition, static type checking capabilities, and seamless framework integrations—offering a modern, type-safe alternative to other Python GraphQL libraries.
A GraphQL library for Python that leverages type annotations 🍓
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages Python type hints and dataclasses for schema definition, making code clean and familiar, as shown in the getting started example with @strawberry.type decorators.
Includes a mypy plugin for static validation during development, allowing early error detection and ensuring schema correctness before runtime.
Provides built-in integrations with Django, Starlette, and Quart, simplifying GraphQL endpoint setup in existing Python web apps, as detailed in the README.
Comes with a CLI and development server (strawberry dev) for rapid prototyping and automatic GraphiQL serving, enhancing the testing and exploration experience.
As a newer library, Strawberry has fewer community plugins, extensions, and third-party tools compared to established alternatives like Graphene, which can limit advanced integrations.
Requires Python 3.7+ for dataclass support, excluding legacy systems and adding a barrier for teams on older Python releases without modern type features.
Support for complex GraphQL features such as subscriptions or Apollo Federation is less polished or in development, as the README focuses on core functionalities without deep dives.