Skip to main content

Bramble GraphQL

A GraphQL library for Python, with parsing, validation, and query lowering implemented in Rust and exposed through a thin PyO3 extension. The schema-declaration API (decorators, type resolution, directives) is pure Python and dataclass-based.

Features

  • Decorator-based schema definition: @bramble.type, @bramble.interface, @bramble.input, @bramble.union, @bramble.scalar
  • Real dataclasses under the hood — @bramble.type-decorated classes are ordinary dataclasses, not a parallel object model
  • Custom scalars, schema directives, and operation directives (@skip, @include, and user-defined directives), each with location validation
  • Async and sync execution (Schema.execute / Schema.execute_async), with spec-correct null bubbling, fragment/field merging, and concurrent field and list-item resolution (mutations execute their root fields serially, per spec)
  • SDL rendering (Schema.to_sdl()) and Automatic Persisted Queries
  • Rust-based parsing and validation for performance and spec conformance

Installation

Requires Python 3.10+.

pip install bramble-graphql

The distribution is named bramble-graphql on PyPI; the import package is bramble:

import bramble

Prebuilt wheels are published for Linux (x86_64, aarch64), macOS (Apple silicon), and Windows (x64). Other platforms fall back to the sdist, which needs a Rust toolchain to build.

To pull in an HTTP framework's dependencies alongside Bramble, install the matching extra — asgi, starlette, fastapi, flask, django, or cli:

pip install "bramble-graphql[fastapi]"

Quickstart

import bramble

@bramble.type
class Query:
    @bramble.field
    def hello(name: str = "world") -> str:
        return f"Hello, {name}!"

schema = bramble.Schema(query=Query)

result = schema.execute("{ hello }")
# {'data': {'hello': 'Hello, world!'}}

print(schema.to_sdl())
# schema {
#   query: Query
# }
#
# type Query {
#   hello(name: String! = "world"): String!
# }

See examples/blog for a fuller schema covering interfaces, unions, custom scalars, schema/operation directives, mutations, and async resolvers.

Development

Working on Bramble itself needs a Rust toolchain. maturin builds the extension in place:

pip install -e ".[dev]"
# Rust
cargo test --workspace
cargo clippy --workspace --all-targets

# Python (rebuild the extension after any Rust change)
maturin develop
pytest

Project layout

  • crates/bramble-core — pure Rust: parsing, validation, lowering, SDL rendering, error types. No Python dependency.
  • crates/bramble-py — PyO3 bindings exposing bramble-core to Python.
  • bramble/ — the Python package: schema-declaration decorators, execution engine, and the public API.
  • tests/ — Python test suite.
  • examples/ — example schemas.

License

Dual-licensed under MIT or Apache 2.0, at your option.

Metadata

Release files for bramble-graphql 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bramble-graphql 0.3.2
File Size Uploaded Provenance Actions
bramble_graphql-0.3.2.tar.gz 224.1 kB With provenance Details for bramble_graphql-0.3.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for bramble-graphql 0.3.2
File Actions
bramble_graphql-0.3.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for bramble_graphql-0.3.2-cp310-abi3-win_amd64.whl
bramble_graphql-0.3.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for bramble_graphql-0.3.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
bramble_graphql-0.3.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for bramble_graphql-0.3.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
bramble_graphql-0.3.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for bramble_graphql-0.3.2-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 4.1 MB

Release files / bramble_graphql-0.3.2.tar.gz

Download URL bramble_graphql-0.3.2.tar.gz
Size 224.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f3ce6f9f166c723e14d2668fa1146822015828fc337abc676138786950839f28
BLAKE2b-256 checksum
How to use checksums
521f9bc16ec6c908ad34280102c3a43986bf0e6689dc93b8d4359df120c4dc8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / bramble_graphql-0.3.2-cp310-abi3-win_amd64.whl

Download URL bramble_graphql-0.3.2-cp310-abi3-win_amd64.whl
Size 857.4 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
74de9b48f6aee69d00be70036ce767a4dd9c2ec81f0d2cbd2c68c86a211ab1b3
BLAKE2b-256 checksum
How to use checksums
3d6c360884d937c89b75bc225961ac4677139c4f1e5649126483a403bc5a6378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / bramble_graphql-0.3.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL bramble_graphql-0.3.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
fe563527f4d14942cf673e74f760416b763155eea9de9f80c9b37b1b98959766
BLAKE2b-256 checksum
How to use checksums
0c338e9a678a01ff89d399942306bed7dc15d2a322916a16a682dc16d5ffd1dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / bramble_graphql-0.3.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL bramble_graphql-0.3.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
3eb63da9f789c5836a38934b24586990292e707de54db0acd9fb67d963cf394c
BLAKE2b-256 checksum
How to use checksums
171eb2553d46c9c243fa545e8986a25fd7565426efc8738d9e44da3622f4e421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / bramble_graphql-0.3.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL bramble_graphql-0.3.2-cp310-abi3-macosx_11_0_arm64.whl
Size 947.0 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c96b2a2282426a48d040dec0dba25445af1fd47e0e8980d0a6e2b682313f0e59
BLAKE2b-256 checksum
How to use checksums
50d2c1028a0f71f345992060f5081b5cd806571588efe1206df9fba93d0d0b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for bramble-graphql 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for bramble_graphql-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page