brotkit
GPU-accelerated, SymPy-driven fractal rendering for notebooks.
Highlights
- Any SymPy formula, with analytic derivatives. Write f(z, c) in SymPy. brotkit differentiates it, lowers it to real arithmetic and compiles one fused kernel for the CPU (Numba) or GPU (numba-cuda).
- Render once, colour many. A render saves raw data layers (iterations, final z, log|dz|, orbit statistics), so you can try 50 palettes on a 16k image without re-iterating.
- Correct anti-aliasing. Adaptive scrambled-Sobol supersampling, with every sample coloured and then filtered in linear light.
- Precision tiers for deep zooms. f32, df64, f64, double-double and quad-float picked automatically from the zoom, with perturbation to come.
- 4D animation. Parameter paths, SO(4) rotations through the (z₀, c) space between Mandelbrot and Julia slices, and a frame pipeline straight to video.
Install
uv add brotkit # CPU (Numba)
uv add "brotkit[cuda]" # NVIDIA GPU (numba-cuda + CUDA runtime wheels)
uv add "brotkit[video]" # video encoding (PyAV)
The GPU extra needs only an NVIDIA driver; the CUDA runtime and compiler come as wheels.
The minimum driver and compute capability will be pinned after spike S1. Check your setup
with brotkit doctor (backlog 1.20).
Quickstart
Coming with the walking skeleton (backlog 1.8 and 1.23): at most 10 lines that render a Mandelbrot set and then recolour it without re-rendering, each followed by its output image. Every code block in this README will run in CI.
Gallery and features
The gallery arrives with the docs site (backlog 1.23).
| Area | What's planned |
|---|---|
| Families | Escape time (Mandelbrot, Julia, Multibrot, Burning Ship, any SymPy f(z, c)); convergent (Newton, Halley, Nova, Magnet); density (Buddhabrot, Nebulabrot, inverse iteration, strange attractors) |
| Colourings | Smooth iteration, distance estimate, binary/n-ary decomposition, stripe/TIA/curvature averages, orbit traps, potential, interior period/multiplier, Lyapunov |
| Precision | f32, df64, f64, dd, qf, with auto selection; perturbation + BLA for unbounded zoom |
| Animation | Keyframe tracks, log-width zooms, complex-parameter paths, SO(4) rotations, exponential-map zooms, iteration-folding views |
CLI
brotkit render recipe.json
(backlog 1.20)
Docs
The documentation site and its llms.txt arrive with backlog 1.23.
Contributing, citing, licence
- Contributions are welcome. See CONTRIBUTING.md, and if you work with a coding agent, AGENTS.md.
- If you use brotkit in research, please cite it using CITATION.cff (GitHub's "Cite this repository" button).
- Licensed under the BSD-3-Clause licence.
Metadata
Release files for brotkit 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brotkit-0.0.2.tar.gz | 6.6 kB | With provenance | Details for brotkit-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brotkit-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for brotkit-0.0.2-py3-none-any.whl |
Total release size: 13.2 kB
Release files / brotkit-0.0.2.tar.gz
| Download URL | brotkit-0.0.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e191be069b44b710db00d94cd6ce2c01407d0c801d87a7990d8d996fe7ea2f11
|
|
BLAKE2b-256 checksum How to use checksums |
ca8e2619be2bc6c119edc25fd12de2448fa0e98406e9fea334be973d11e9c4a7
|
| 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 logRelease files / brotkit-0.0.2-py3-none-any.whl
| Download URL | brotkit-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
992be3def044d62c2e4eff5dad5a9e9b212cf32937667e5ef992e0f5fbea83d7
|
|
BLAKE2b-256 checksum How to use checksums |
3aa1abdb7e0764916c776578b17b26552997e3a81ae2d9c10b828dabc8ff0b5f
|
| 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 logSecurity for brotkit 0.0.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
Both files in this release have been uploaded with provenance metadata.
Attestation for brotkit-0.0.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 logA 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.