🌿
The unofficial
ZEF zine
~ a page-by-page book, zero to pro ~
data › code
everything is a value
pipes all the way down
28 chapters
a slow, friendly tour of the Zef framework.
built page by page so you can read it like a book.
turn the pages with ←
→
or click any chapter below.
how this book is organized
Zef is a big framework. We'll climb it like a hill — pausing often, looking back, making mental models along the way. Each chapter is one page, meant to be read in 5–12 minutes. Don't skip — the later ideas lean on the earlier ones.
Every page has:
- a mental model box (the picture in your head)
- plenty of examples — runnable if you have zef installed
- "gotcha!", "wait what?", and "try it!" interruptions
- prev / next navigation at the bottom, and keyboard arrows
🗺 Table of Contents
PART I — Foundations
01
what
is Zef?
a one-page mental intro
02
the three big ideas
types, ops, FX
03
the pipe
|data flowing left to right
PART II — ZefOps (pure computation)
04
ZefOps basics
map, filter, reduce, apply
05
ZefOps patterns
match, rearrange, F, Z
PART III — Data & Types
06
Zen notation
Python literals ARE data
07
types are sets
is_a, refinement, Z-expr
08
entities & identity
ET, UIDs, 🍃 prefix
09
multiary fields
F vs Fs, the _ trick
PART IV — Graphs
10
the graph data model
objects as graphs
11
updating graphs
this+, field_, diffs
12
crawl: traversals
declarative graph-to-tree
PART V — Effects & Functions
13
FX: effects as data
construct, then run
14
the FX catalog tour
Print, HTTP, Random, Time...
15
@zef_function
content-addressed handlers
PART VI — State & Persistence
16
databases
DictDB & ArrayDB
17
signals
thread-safe state with history
PART VII — Concurrency
18
actors 101
topics, handlers, state
19
actor patterns
state machines, fan-out
20
pub-sub & timers
Subscribe, Publish, Timer
PART VIII — Servers & Clients
21
HTTP servers
routes, responses, JSON
22
websockets
broadcast + actor-per-client
23
auth + HTTPS
OAuth, Let's Encrypt
PART IX — Advanced
24
parsing with patterns
Sequence, parse2, JSON in 25 lines
25
workers & isolation
processes for fault tolerance
26
the chat agent
end-to-end LLM app
PART X — Wrap-up
27
the zen of zef
philosophy recap
28
🎴 cheat sheet
the single-page reference
how to actually run the code
If you want to try things as you read, install zef with pip install zef
(or build from source as CLAUDE.md describes). Every example in this book is
written for the current API. Open a Python REPL, do from zef import *,
and paste away.
If you don't have zef installed — no worries. Read the pages like a picture
book, let the mental models soak in, and come back later to actually run things.