snnlab
A Python library for authoring, simulating and visualising spiking neural networks with conductance-based and current-based dynamics.
uv add snnlab
from snnlab import lang, sim, viz
snnlab.langauthors and validates deterministic graph bundles.snnlab.simexecutes graphs and supports surrogate-gradient training.snnlab.vizrenders recordings, diagrams, figures and animations.snnlab.extensionsregisters versioned Python definitions for custom dynamics, weights, operations, training and encoders.
The graph simulator supports COBA-LIF, current-based LIF and leaky-integrator populations, conductance and exponential-current synapses, recurrent/feedback connections and integer-timestep delays. Registered Python callbacks add custom models without embedding code in bundles; import their registration module before compilation or execution. See examples/current-lif/current_lif.py for a built-in current-based simulation and examples/customisation/customisation.py for an adaptive current neuron and custom weight distribution.
Simulator commands
uv run snnsim --help
uv run python -m snnlab.sim sim --help
Graphviz (dot) is required for diagram exports. FFmpeg is required for video exports. Install these separately through your operating system package manager. Core authoring and simulation do not require either executable.
Development
uv sync --dev
uv run pytest -m "not slow"
For development in Pinglab, use uv add --editable ../snnlab. For reproducible runs, use a Git tag or commit and commit the consumer lockfile.
Documentation
The Fumadocs site lives in docs/, with Installation and Quickstart guides.
cd docs
bun install --frozen-lockfile
bun run dev
Compatibility
Release history is recorded in CHANGELOG.md. See
VERSIONING.md for the version policy, release preparation and
tagging workflow. Check release metadata with uv run python scripts/version.py check.
This initial extraction retains the existing bundle schemas, backend target tools/snnsim, component format versions and numerical defaults. Those strings identify persisted scientific contracts; they are not Python import paths. Package version 0.1.0 identifies the combined distribution.
The retained-data regression against historical Pinglab runs remains in Pinglab. The portable tests live here. No scientific runs or generated example bundles are shipped.
MIT licensed.
Metadata
Release files for snnlab 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| snnlab-0.2.0.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snnlab-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.4 MB
Release files / snnlab-0.2.0.tar.gz
| Download URL | snnlab-0.2.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
188ab77d64a58f7a33771211f1602db434b791b8a40da94daf8c65254b5e6eb8
|
|
BLAKE2b-256 checksum How to use checksums |
f2f00a1cffeda1f20c27ee6faf6472f8deef2a9c2dbc3fd2b062bfe2d37f2c11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / snnlab-0.2.0-py3-none-any.whl
| Download URL | snnlab-0.2.0-py3-none-any.whl |
|---|---|
| Size | 226.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3568a6bd35b41338d2722bf3a9b229a7bfd8e53be73bed7e6ee3d434d5fd6005
|
|
BLAKE2b-256 checksum How to use checksums |
c809f7fc76c80cb62aefaec902b82d21672f763e1dd23b9d217824a0aedc9a5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency log