API reference#
The modules a user of PyPhi works with, grouped by what they do. Each entry opens the module’s page: its functions, classes, and submodules. Modules that only serve the package’s internals (import deferral, registries, protocols, type aliases, utilities) are not listed.
The top-level namespace#
import pyphi gives the everyday API in one place: Substrate, System,
analyze, sweep, examples, and config.
The example networks page shows every registered example rendered from the objects themselves.
PyPhi |
Substrates and systems#
Represents the substrate of interest. |
|
System value type — |
|
High-level interface for creating systems by specifying architecture. |
|
Example substrates and systems to go along with the documentation. |
|
Estimate substrates from observed transitions, with epistemic uncertainty. |
|
Helper class representing labels of substrate nodes. |
|
Functions for determining substrate connectivity properties. |
|
Conversion functions. |
|
Methods for validating user input. |
Analysis#
|
Analyze one candidate system over |
|
Run a computation across the cartesian product of axes into a tidy table. |
Analytic workload counting for single-system analyses. |
|
Layered configuration system for PyPhi. |
|
Phi formalisms — strategies for computing integrated information. |
|
Utilities for generating partitions. |
|
Causal directions. |
|
Implements the formalism for computing relations. |
|
Resolve ties between IIT objects. |
|
Condensation of candidate systems into complexes. |
|
Intrinsic-units macro framework (Marshall et al. 2026). |
|
Methods for computing actual causation of systems and mechanisms. |
|
The matching formalism: perception and matching. |
|
Continuous-parameter analysis of IIT quantities over substrate space. |
|
|
Search a substrate's weights for a maximizer of an IIT quantity. |
Functions for simulating system state trajectories. |
Results#
See |
|
Unified object display: declarative descriptions rendered by pluggable backends. |
|
Tolerant scalar comparison of φ, Φ, and α values. |
|
Distance functions. |
|
Typed, compact (de)serialization of PyPhi results via msgspec. |
|
Provenance record attached to top-level result objects. |
|
Bridge between PyPhi value types and graph representations. |
|
Provides visualization capabilities for PyPhi objects. |
|
PyPhi exceptions. |
Infrastructure#
Provides an interface for parallel computation. |
|
Memoization and caching utilities. |
|
Distribute PyPhi computations across an HTCondor pool as batch campaigns. |
|
Model Context Protocol server exposing PyPhi to AI agents. |
|
Utilities for logging and progress bars. |
Lower-level building blocks#
Lower-level value types and primitives shared across PyPhi. |
|
Functions for manipulating probability distributions. |
|
Functions for manipulating the timescale of TPMs. |
|
Behavior-aware substrate canonicalization. |