Skip to main content

brotkit

GPU-accelerated, SymPy-driven fractal rendering for notebooks.

Python Licence: BSD-3-Clause

CI

uv Ruff Checked with pyright pre-commit Conventional Commits

AGENTS.md

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.

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

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)

Source distribution for brotkit 0.0.2
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)

Table of built distributions (wheels) for brotkit 0.0.2
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files Full provenance

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